77
Views
5
Comments
How to add list item dynamically
Question

hi,

I'm taking one integer value from the user named "Levels"; levels like 2,5,8,7, and so on can be entered here.

and if the user selects three levels, three list items indicate that three forms will be displayed to them. I have one form inside the list. 



I used a list, with an accordion item located inside the list and a form under it. 


2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi Harbor V,

If possible can you share OML or some screen shot for more understanding exactly what you are looking. Thanks!!


Regards,

Rajat


2020-04-13 16-36-48
Gabriel Araujo

Hello @Harbor V 


If I understood correctly what you need, try to append a “form” like structure to the list how many times tou need. 

Like, on your example, if the user selected three levels you append this structure form you created three times to the list you have. 

2024-10-19 11-15-19
Sazid

Hello @Harbor V -

You can achieve this in following way

Create an Input for Levels and Create a List Variable to Hold the Forms and Initialize the list based on the input. Then you can display List of forms dynamically by using list widget and bind it to  list variable

You can also use on change property on input to append value in list

If you input 3 your screen will look like following adjest widgets of forms as needed

2022-12-30 09-46-57
Deepika Patel

Hi,

Please refer the OML.

Hope this helps!

Thanks

Labels.oml
2021-11-19 11-12-44
Rui Mendes

Hi @Harbor V 

I’ve put together an example to see if it matches what you’re trying to achieve.

From what I understand, you need to show or hide forms from a list. In this example, when you select a name, its corresponding form is displayed. Clicking again hides that specific form. If you have multiple names selected, you’ll see multiple forms visible.

Hope this helps!
Exemple:
https://ruihmendes.outsystemscloud.com/FormByLevels/

Best regards,

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