Iterating over two lists on single table records widget

Iterating over two lists on single table records widget

  

Hi,


I have table records widget which displays employee entities from a table. That list contains a foreign key (CompanyId). Now when I fetch I have to display a list of companies as well in the table instead of company Id. Is there any easy way to achieve this? Can I iterate over to list in single table records? Because I have a list of companies in a structure list and list of employees in employee structure list 

Hi Neha , 

Can one employee be associated with multiple multiple company?


Regards

-PJ-


PRAMOD JAIN wrote:

Hi Neha , 

Can one employee be associated with multiple multiple company?


Regards

-PJ-


No, one employee can only be associated with one company


Hi Neha,

I think you should review this course https://www.outsystems.com/learn/lesson/790/retrieving-data-in-outsystems/

What you want to do is, on the aggregate you want to get all the employees and the respective companies linking them by the foreign key.this way you will get both entities in the same structure. On aggregate with the employees add a new source "companies" and outsystems will do the rest.

Regards,

Marcelo

HI Neha ,

In that case you need to add Company entity in your aggregate source and set CompanyName variable of Company Entity in your list with an expression.

See the oml attached , Employee list i have Company Name and it is bind with the ComanyName in Company entity.


Regards

-PJ-