In my datatable has two record and the item come from collection “ opselectcasedata"
After user click “request id “ then will navigate to another page
The user can modify any item data , like “reason request” or “vat type” …….then user will click “Save “ button then navigate to previous page .
After click “Save “ , weird things happened …….the page will transfer show first record in that collection .
This is the code in my “Save” button , so what’s wrong with my code ??
Solved! Go to Solution.
I guess all your controls in the second screen had Default property set to Gallery.Selected. .....
When you modify the source (collection) of the Gallery, the gallery itself resets to show you the new values (even this is happen in another screen). Or after reset the default selected item of a gallery is the first item. That's why all your controls from the second screen shows the values of the first item of collection.
To solved it use a global variable:
Gallery.OnSelect -> Set(itemSelected, LookUp(opselectcasedata,requestID=Gallery.Selected.requestID))
In Default property of the second screen use itemSelected instead on Gallery.Selected.
And finally add to Save button -> OnSelect after your code:
Set(itemSelected, LookUp(opselectcasedata,requestID=itemSelected.RequestID))
Hope it helps !
I guess all your controls in the second screen had Default property set to Gallery.Selected. .....
When you modify the source (collection) of the Gallery, the gallery itself resets to show you the new values (even this is happen in another screen). Or after reset the default selected item of a gallery is the first item. That's why all your controls from the second screen shows the values of the first item of collection.
To solved it use a global variable:
Gallery.OnSelect -> Set(itemSelected, LookUp(opselectcasedata,requestID=Gallery.Selected.requestID))
In Default property of the second screen use itemSelected instead on Gallery.Selected.
And finally add to Save button -> OnSelect after your code:
Set(itemSelected, LookUp(opselectcasedata,requestID=itemSelected.RequestID))
Hope it helps !
Yes , all the second page the default property is to to gallery.selected.....
So I will modify my code to use your method .
Thank you very much ~~
User | Count |
---|---|
261 | |
110 | |
97 | |
53 | |
39 |