Hi @Mugesh :
Could you tell me:
- What are " flag user actions"?
- What does successful user actions mean?
- What is the gallery's items property?What is the sort rules?
- What is the data structure of the data source?
I assume you want to implement such a function:
After the user selects a check box and changes its value to true, the gallery selects the next item by default.
I've made a test for your reference:
My data source(testcollection):
ClearCollect(testcollection,{title:"test1",check: false ,ID:1},{title:"test2",check: false ,ID:2},{title:"test3",check: false ,ID:3},{title:"test4",check: false ,ID:4},{title:"test5",check: false ,ID:5},{title:"test6",check: false ,ID:6},{title:"test7",check: false ,ID:7},{title:"test8",check: false ,ID:8},{title:"test9",check: false ,ID:9})
1\Add a gallery(Gallery2):
Items:
Sort(testcollection,ID,Ascending) /*sort by ID*/
Default:
First(test) /*test is my custom variable,I will define it later */
2\Add a Check Box control into this gallery:
Default:
ThisItem.check
OnCheck:
Patch(
testcollection,
ThisItem,
{check: true}
); /*Write the checkbox result to the data source*/
ClearCollect(
test,
LookUp(
testcollection,
ID = ThisItem.ID + 1
)
); /*test is a custom collection I used to store the default selection of the gallery */
Reset(Checkbox1); /*Reset the control so that the default properties of the control take effect*/
Reset(Gallery2)
OnUncheck:
Patch(testcollection,ThisItem,{check:false});Reset(Checkbox1)
3\Add a label control(Used to display the currently selected record of the gallery)
Text:
Gallery2.Selected.title

After I changed the value of the checkbox of the 1/2/3/4/5 record to true, the gallery selected the 6th record by default.
Best Regards,
Bof