Generate GUI elements based on records in entity

Hey,

I have an entity that always changes and records get added. I have a page that should show labels of these records. How do i loop through the entity and generate labels in the GUI based on the records?

Hello Salman.

What do you mean by Labels? You can place the Label widget inside a table or list and use it to show values from an entity, but I think you meant something else.

Nuno Reis wrote:

Hello Salman.

What do you mean by Labels? You can place the Label widget inside a table or list and use it to show values from an entity, but I think you meant something else.

Labels as in the widget text to write in the page. I dont want to add a table i just want to show label widgets of all the records in the entity. For example if i have 3 records, 3 label widgets appear. If i have 4 records, 4 label widget appears and so on.


Solution

You have two options.

1. Use a multiple entries components (Table Records/List Records/Carousel/Stacked Cards) and place several Labels/Expressions on screen, one for each record.

2. Do a Loop over the Entity and fill a variable. On screen use Expression to show all values as one.

Of course you can be creative and use JavaScript to do a List, but the standard are those two. You'd be doing the same with more work.


Have you tried List Records? It is very basic and can be used for multiple purposes.

List Records (with no line breaks) and Tag (from OutSystemsUI) are one of my favorite combos to show labels/tags/categories on screen. In Traditional it is straightforward.

Solution

Nuno Reis wrote:

You have two options.

1. Use a multiple entries components (Table Records/List Records/Carousel/Stacked Cards) and place several Labels/Expressions on screen, one for each record.

2. Do a Loop over the Entity and fill a variable. On screen use Expression to show all values as one.

Of course you can be creative and use JavaScript to do a List, but the standard are those two. You'd be doing the same with more work.


Have you tried List Records? It is very basic and can be used for multiple purposes.

List Records (with no line breaks) and Tag (from OutSystemsUI) are one of my favorite combos to show labels/tags/categories on screen. In Traditional it is straightforward.

Problem is i have a specific design to do and im afraid a list record might not let me do it as the mock-ups given to me. But, i will try it out now maybe i can work something out. Thanks for your help Nuno. 


In the end, the customer must get what was required,  but the question is always "can I simply write CSS to make it look what I want or do I need to code everything, not taking advantage of low code?"

OutSystems is not supposed to make things harder than conventional code. Worst case scenario is "as hard as conventional code".

Hi All,

of course the customers must get what they want, but educating the customer on the standard widgets and UI patterns available in Outsystems, could help inform them on what they should want ;-) and can make a huge difference in the time needed to make it happen.

I'm with you Nuno, one of these 2 low code options is preferable over custom javascript coding.

Salman, why don't you give more detail on how the customer wants it, then maybe the community can give more specific tips on what standart UI patterns might help you ?


Dorine


Nuno Reis wrote:

In the end, the customer must get what was required,  but the question is always "can I simply write CSS to make it look what I want or do I need to code everything, not taking advantage of low code?"

OutSystems is not supposed to make things harder than conventional code. Worst case scenario is "as hard as conventional code".

I managed to create it and customize it using the list records. Turns out list records are pretty customizable in terms of GUI. Thanks for your help!


They are my favorite "not for every page" component. I'm glad to evangelize you into it.

Dorine Boudry wrote:

Hi All,

of course the customers must get what they want, but educating the customer on the standard widgets and UI patterns available in Outsystems, could help inform them on what they should want ;-) and can make a huge difference in the time needed to make it happen.

I'm with you Nuno, one of these 2 low code options is preferable over custom javascript coding.

Salman, why don't you give more detail on how the customer wants it, then maybe the community can give more specific tips on what standart UI patterns might help you ?


Dorine


Hello Dorine,
I stated above i managed to create it using list records i just didn't know they were customizable like it is. This is my first time working on a low code platform as i have been coding normally using multiple languages and frameworks for years. I still have a lot to learn but i can tell you after 2-3 months of using it low-coding, it is the way to go it just has some learning curves for beginners.