03-31-2024 4:47 AM - edited 03-31-2024 5:02 AM
Hi dear experts.
I am doing some mix between a lot of Youtube tutorials and now i am facing some troubles with List of Object.
I want to present a list of selected Items on my app. the selection takes place in a second Page with the help of a "Add New" Button.
For this i use an App Variable "List of Objects" to store the selected items in the second page and present this list in the first page.
Everithing is working for me but i want to add logic to my app to delete the "List Of Object" when you leave the first page or when you confirm the creation of the document in the fist page.
is there a way or function that can helpme to do this?
the only way i am thiking is to do several "Set App Variable" flow functions
IF(IS_EMPTY(appVars.LISTOFOBJECTSVAR)==true,appVars.LISTOFOBJECTSVAR,WITHOUT_ITEM(appVars.LISTOFOBJECTSVAR, LAST_ITEM(appVars.LISTOFOBJECTSVAR)))
I thik there will be a smarter way to do this
03-31-2024 5:16 AM - edited 03-31-2024 5:17 AM
discovered the IF Flow function. I think with this logic i can continue my journey.
i am leaving this here because there are some lost data from old forums that explain this.
04-01-2024 8:35 AM - edited 04-01-2024 8:36 AM
If you want it empty, why can't you just set it to empty or [ ] ?
This is what we do in our SAP Build CodeJam, when we want to delete the cart of items (or you can do via formula).
If you want to delete all records from, for example, on-device storage entity, you may need a loop like this.
04-02-2024 12:36 AM
This is great i as simple as i wanted.
Just putting "[]" (without the quotes) and tats all.
i will stay tuned with the CodeJam if you stream something.
sorry if my English isnt verry clear i am Peruvian and im not fluent in english