0

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 1

0

I believe you want something like that :

enter image description here

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

enter image description here

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.