Hello All,
I have a list variable which contains the data that needs to be updated. I have a structure that contains the updated data. How can I update the contents of a list with the data present in the structure.
For eg. I have a table named TABLE 1. I have a list variable whose datatype is List of Table1. This list variable contains all the data that needs to be updated. I have a Structure which contains all the updated data.
Now, can anyone please tell me how to update the list variable with the data of the structure.
Everytime the server action for updating the data is called, the data in list variable also changes and the updated data also changes according to the filters applied. It is done in reactive.
Hi Runisha,
Please follow the below steps to update the list from structure on client side. Please find the attached sample OML as well.
1. You need to iterate list first. For that you can use for each widget.
2. You need to compare list current item with your structure.
GetProducts.List.Current.Sample_Product.Name = ProductStructure.Name
3. If condition is true update the current list with structure data.
4. If your structure is list type then you can use ListFilter client action that is available in System.
Thanks
Vinod
Hello Vinod, thank you for your solution. But, can you suggest me how to do the same thing through server action.
You need to write same logic in server action. You need create a server action with input and output parameter. Please see the below screen. Write the same logic as mentioned in previous comment. In last assign updated list to the output parameter.
Hey,
The simplest way is.If you have list of table and structure with updated data then follow below step
In action,
Hope this will help you.
Yogesh Javir
Not adding to the possible solution already shared by others, but having a question. Why do you want to update the list if it is populated from the database? Is it because you cannot retrieve a particular value and need to calculate it?