I am creating a powerapp with a gallery, i added a checkbox withing the gallery and I also have a combobox in the gallery, I need to set default value in combobox when checkbox is checked. The combobox will only be visible when checkbox is checked, I added and index to the gallery to identify each gallery rows
1 Answer
I believe you want something like that :
Please follow this steps :
1- your collection should be something like the following :
ClearCollect(
colGallery,
{
Title: "A",
YesNo: false,
ComboList: ["1","2","3"]
},
{
Title: "B",
YesNo: true,
ComboList: ["1","2","3"]
}
)
2- insert your gallery and update the Items property with the your collection :
Items : colGallery
3- insert in your gallery a label for the title, a checkbox and a combobox
4- Update the OnSelect property of your gallery with the following formula :
Patch(colGallery,Gallery1.Selected,{Title:ThisItem.Title,YesNo:Checkbox1.Value,ComboList:ThisItem.ComboList})
5- on both OnCheck and OnUnCheck properties of your checkbox paste the following formula :
Select(parent)
6- on your combobox OnVisible property, use the following :
ThisItem.YesNo
This should help you.