Topic: How to link selected grid rows to counter in different table?
Hello Guys Evening To Everyone.
I am trying to link multiple selected rows from table grid to counter in counter table.
Which I don't know how to do it.
My Visual Database → General → How to link selected grid rows to counter in different table?
Hello Guys Evening To Everyone.
I am trying to link multiple selected rows from table grid to counter in counter table.
Which I don't know how to do it.
Hi,
I had a quick look at your project and, unless I'm missing something, I don't think you need to make it as complicated as you are doing.
Specifically, why do you need a separate table just for the 'editcounter' when it could simply go on the 'linkitems' table.
Have a look at the attachment.
Regards,
Derek.
Hi,
I had a quick look at your project and, unless I'm missing something, I don't think you need to make it as complicated as you are doing.
Specifically, why do you need a separate table just for the 'editcounter' when it could simply go on the 'linkitems' table.
Have a look at the attachment.
Regards,
Derek.
Thank you Derek.
@derek I already tried that but that is not I want.
it creates 1 auto number per row.
What I want is a 1 reference number for filtered selected rows[can be one or more than one].
Take Invoice as an example one invoice number can reference one or more than one items in it.
0001 is link to 3 Item Below.
John - Item 1 qty - 5
John - Item 2 qty - 2
John - Item 3 qty - 1
If counter is not good way to do it, suggest me something which autoincrement and unique number.
In that case, simply use a 'header' table (with the 'counter') and then use another table to hold all the related line items.
Please see attached (I used one of my own templates as it was quicker to demonstrate but everything can be applied to your project / layout).
One other suggestion is to use just a single form to maintain your reference tables ('clients' and 'items'). In bigger projects where you might have many such reference tables or if your current project starts to grow, it can be a big time-saver when developing it and your program will load faster.
Derek.
Hi,
i cannot find any example where 1 customer order many items and not repeat customer name in grid?
I attach screenshot.
sorry for my bad english.
Igor
Hi,
This is because the original requirement was for a job (jobheaders) that contained many items (joblines) and each job line could be for a different client.
What you are asking about is a job (jobheaders) that contains many items (joblines) but every job line is for the same client.
In this case, you can
1. remove the relationship between client and joblines
2. create a relationship between client and jobheaders
3. adjust the tablegrids
4. adjust Form2 and Form3
I believe these changes should give you the sort of thing you are wanting (see attachment).
It's okay if it's easier to post messages in your own language - most of us use 'google translate' anyway.
Regards,
Derek.
Thank you for help
maybe this attachment will be more precise.
1 order number 1 customer but 2 or more items he ordered in same tablegrid thats what i was thinking.
ORDER NUMBER / CUSTOMER / ITEMS / QUANTITY
1 / Igor / Bottle / 15
/ / Mug / 10
2 / Marko / Pencil / 5
I start to make simple app for single user in my small family company so i will send it when i stuck
and probably i will.
maybe somewhere in forum have example for that but i cannot find it.
Thank you
Hi,
I suspect from your screenshot that you are using a spreadsheet and although it might look how you want to see it (because you have removed the repeated data) if you ever need to re-sort your spreadsheet, you will encounter problems.
With a relational database (such as sqlite which is the default database used by MVD) data is typically presented in two or more tablegrids to avoid repeated data being displayed. Putting all the data in a single tablegrid can be done but will result in certain pieces of information being repeated (ie Order No, Customer etc).
Have a look at the attachment for how it works.
Derek.
Thank you Derek,
ill go try with your advice,
should i post my work here or should make new topic for my work?
Hi,
Probably better if you can create a new topic.
Derek..
My Visual Database → General → How to link selected grid rows to counter in different table?
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi