Submitted by Alp on 2020/07/04 09:29
Hi,
 
I'd like to combine two grids with a common field under a new grid that self-populates all items without any need for my interaction. My "grid: fields" are
 
stores: item (holding storeid), storenames, city
employees: item (holding employeeid), storeid, employeenames

I can transfer storenames and city fields from stores grid into employees grid through the following SQL query under a new field 'storecode': "Select Item as storecode, storenames, city from stores". However, this way, I need to select store names for every employee one by one myself. With hundreds of employees, this is not feasible.

Is there a way that I can combine fields of these two grids under a third grid making use of their common field, i.e., storeid, without my interaction for each item?
 
Thanks,
Alp

Comments

Hi Alp,
 
It should be quite easy to setup a grid that contains both lists, and which would automatically update when either are modified
Try setting the new grid source to Stores OR employees (or whatever the 2 grid source are, combined with the OR operator)
 
To change the grid source, show the source bar and enter the above in the source text box
Details here Grid Source EditBox
 
Pierre_Admin
IQ Designer
 

Alp

2020/07/04 13:36

In reply to by Pierre_Admin

Thank you, Pierre. I tried that and got the following. I am documenting each step in case I made a mistake in the process.
 
Stores grid
 
Employees grid
 
When I combine these two into new EmpLocations grid with stores OR employees in the source, I got
 
This is not quite what I expect; but, instead, something like this
 
or better yet, this
 
Thank you,
Alp

Tom

2020/07/04 18:02

In reply to by Alp

How is the StoresID field currently populated?

Alp

2020/07/04 18:57

In reply to by Tom

Third screenshot from the top (EmpLocations grid) shows it, Tom: 4th column from the left.
 
Alp

Hi Alp,
 
I now get what you want to do. Checkout this page which also describe how to make IQ behave like a relational database (which it isn't):
 
Also note that in the Ecco Pro philosophy, the Item field is central to your information management and holds the "item name" which is what best describes the item
 
Pierre_Admin
IQ Designer