I am trying to create a purchase requisition form. User can choose a categorie (Dropdown1) and then the list of articles is filtered (Dropdown2). Automatically the price of that article is looked up and will also be displayed. The user then can enter the number of articles he/she wants to buy and the end price is calculated.
All of this is entered in an item of a gallery. When hitting "save" the item will be added to the collection (via "patch") and with "collect" a new item in the gallery is added, so that another item can be selected (if the user wants to buy another item).
(Big THX goes out to Shane Young for his videos - in this case the videos regarding repeating tables!!!)
Everything works fine. Problem is: As soon as I hit "save" a new item is added to the gallery BUT the first item will get reset to the default value. The selected value will get patched to the collection, but in the frontend (in the gallery) you cannot see what you just added.
Any help with this? I did not interfere with the "reset"-settings.
Solved! Go to Solution.
Hi @esemuhdeoh ,
The reason why you met this problem is that the gallery's Selected Item is the first item by default.
When you click the patch button, the selecting action will be invalid. So your gallery's selecteditem will change to the first item by default.
I suggest you save the item that you just selected as a collection before you perform patch function.
For example:
ClearCollect(test, gllery.selected);Patch(...)
Set the gallery's Default to:
First(test)
Then, your patch action will not affect the gallery's selected item.
Best regards,
Hi,
I have just build an app with repeating tables. Can you show the code for updating the collection?
Hi @esemuhdeoh ,
The reason why you met this problem is that the gallery's Selected Item is the first item by default.
When you click the patch button, the selecting action will be invalid. So your gallery's selecteditem will change to the first item by default.
I suggest you save the item that you just selected as a collection before you perform patch function.
For example:
ClearCollect(test, gllery.selected);Patch(...)
Set the gallery's Default to:
First(test)
Then, your patch action will not affect the gallery's selected item.
Best regards,
User | Count |
---|---|
140 | |
133 | |
80 | |
75 | |
74 |
User | Count |
---|---|
210 | |
199 | |
71 | |
66 | |
55 |