284
Views
9
Comments
Solved
vertical and horizontal data
Question

Hi All 

I have two tables for both vertical and horizontal data. Can we recreate the attached image format in outsystems?  If yes, then what should be done to achieve it?


Regards

Kavya Balaji


table.png
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Thanks. I think it's easy: since all the columns (except for Import/Export, I don't see those) are in ModulePermission, you create an Aggregate that joins ModulePermission (with a Filter on EmployeeId) with ModuleDetails, and put the result in a TableRecords. Since the Read/Write/Create/Delete Attributes are booleans, you can add checkboxes and bind them to the Attributes.

UserImage.jpg
kavya anbazagan

Kilian Hekhuis wrote:

Thanks. I think it's easy: since all the columns (except for Import/Export, I don't see those) are in ModulePermission, you create an Aggregate that joins ModulePermission (with a Filter on EmployeeId) with ModuleDetails, and put the result in a TableRecords. Since the Read/Write/Create/Delete Attributes are booleans, you can add checkboxes and bind them to the Attributes.


Thanks a lot Kilian and Tiago. I got the expected output

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Kavya,

How is your data stored? Because it's easy to recreate your image if you have Records/Structures containing six booleans and the description.

UserImage.jpg
kavya anbazagan

Hi Kilian

My data are stored in database, the row wise data is stored as normal entity and the column data is stored as static entity.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Can you share the data model (Entity Diagram)? That will make it easier to propose a solution.


UserImage.jpg
kavya anbazagan

Yes, I have attached my entity diagram along with this post.

HRMSED.png
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Thanks. I think it's easy: since all the columns (except for Import/Export, I don't see those) are in ModulePermission, you create an Aggregate that joins ModulePermission (with a Filter on EmployeeId) with ModuleDetails, and put the result in a TableRecords. Since the Read/Write/Create/Delete Attributes are booleans, you can add checkboxes and bind them to the Attributes.

UserImage.jpg
kavya anbazagan

Kilian Hekhuis wrote:

Thanks. I think it's easy: since all the columns (except for Import/Export, I don't see those) are in ModulePermission, you create an Aggregate that joins ModulePermission (with a Filter on EmployeeId) with ModuleDetails, and put the result in a TableRecords. Since the Read/Write/Create/Delete Attributes are booleans, you can add checkboxes and bind them to the Attributes.


Thanks a lot Kilian and Tiago. I got the expected output

2025-11-24 16-53-49
Tiago Rodrigues
 
MVP

Hi Kavya,

Picking the correct idea of Kilian, you can scaffold the entity ModulePermission and create a ModulePermissionList screen.

After that, go to the preparation and change the type of join to "With" with the entity Employee to ensure that appear every employee in the list, even if it does not have any record in ModulePermission entity.

Then, as Kilian says, replace the "expressions" in the table regarding the boolean attributes (ex. Read, Write) with check boxes and bind them to the list record attributes.

Finally, create the "Save" button that goes throw every record and "CreateOrUpdate" them.

I think that I didn't bypass any action. Tell us if you find any problem.


Regards

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Good to hear Kavya, happy coding!

UserImage.jpg
kavya anbazagan

Kilian Hekhuis wrote:

Good to hear Kavya, happy coding!


Thanks again Kilian :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.