Hi everyone,
I am facing an issue when selecting the checkbox of this table below:
I will try to explain the issue:
Scenario 1
- First select one checkbox
- Select the dropdown
- Add a comment
- When saving everything is ok
Scenario 2
- First select two or more checkboxes
- Then select both dropdowns
- Add both the comments
- When saving it only saves one of the comments and the dropdowns
This is my logic for the checkbox_onchange (it is appending the selected values to a variable called ServiceList of type list):
This is the logic for the Comment and Priced_Dropdown OnChange:
Sorry that I can not share oml due to sensitive information.
Any help would be much appreciated.
Thanks!!
Hi @Diogo Gomes , Check Box on change you are correctly mapping the values with List append.but in a Dropdown and Comment how you are doing that?When Every time you are calling a dropdown on change and comment on change its replace the Current value.
Hi @Diogo Gomes,
Well, you are using assigns, the value will always be overridden. So, basically every time you change the price or the comment, you are updating the same record.
When you select the checkbox, you add a new item to the list but without the price and comment. So, when you change these fields, you will have to check if this service is already in your list (use filter list). If yes, update the price and comment of the respective record. If not, you have to add it using the List append.
Here I'm considering the services come from a static table and can't be added twice.
I hope I could help you,
Kind Regards,
Tami
Hi,
Add one additional boolean attribute for checkbox in your table list for all records it will have checkbox value in the list which you are using for display other data
Regards
Shradha