Hi,
I have an app variable called 'Purchase Order Item' that is a list of objects. I have 2 pages ie. Item Details and Item Overview. Item Details page takes user inputs for an item and Item Overview page displays all the items as a list.
I have created a button 'Add Item' on the Item Details page so the item can be added to the Item Overview Page. In the logic canvas of the button, I have used 'Set App Variable' function to update my item list on Overview Page. This function is not appending to the existing items but rather replacing it. For example, if there is item 1 on Overview page and I try to append item 2 to it from Details page, it is replacing item 1 with item 2 rather than appending. Could you please suggest any ideas to resolve this?
Thank you.
Kind Regards,
Praneetha
#SAPBuildApps
Request clarification before answering.
When you click on the "Set App Variable" logic function, on the right panel, you would see "Variable name" and "Assigned Value". In the "Assigned value", you have to choose "Formula" option. A formula editor pop up shows up. You can use the WITH_ITEM formula for this case since you want to append an item to a list. The item should be of the same data type as the list elements.
For eg: Lets say you have a list1(list of objects) which contains the items displayed on the overview page and you want to add item2 to list1 on the click of a button, the formula you would use in the formula editor would be:
WITH_ITEM(appVars.list1, item2) -> change the list1, item2 according to your variable names
The Formula editor shows how WITH_ITEM should be used, on the right side with examples.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.