web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Mammoth of a visible v...
Power Apps
Answered

Mammoth of a visible variables etc.

(0) ShareShare
ReportReport
Posted on by 116

Hi,

 

I have a question type canvas app with sharepoint as the datasource

 

In my app is around 30 radio buttons with the items ["OK","N/A","Defect"]

i then have a double check radio button with the items ["Yes","No"] and i have two Onselect buttons ill call camerabutton and another savebutton

 

once my users has answered every question and if they selected all OK and/or N/A in the questionaire id like for just the savebutton to be visible, however if the user selects one or more Defects in the questionaire id like for the Double check radio button to be visible and then if they select "Yes" on the double check radio button then the savebutton appears (and if they change that question from defect to OK to NA the double check disappears and the save button reappears) and if they select No on the double check radio button id like the camerabutton to appear,


I have tried so many many variables and options however im running around in circles, could someone please set me straight>?

Thankyou

Categories:
  • GarethPrisk Profile Picture
    2,828 on at

    Probably the simplest pattern is to collect any negative response, and then base your eventual show/hide on whether or not there is a negative response in the collection.

     

    To do this, you'll want to 'key' or have a way to identify each individual Radio button (for adding/removing a row from the negative collection). Simplest way to is just collect the Self property, so you don't have to track/add anything. It's less useful if you actually wanna use the objects in the collection, but we just want counts.

    Set this to the OnChange property on all of your question radio buttons

    If(
     Self.SelectedText.Value = "Defect", // Your 'negative' outcome,
     Collect(
     colNegativeResponse,
     {responseKey: Self}
     ),
     RemoveIf(
     colNegativeResponse,
     responseKey = Self
     )
    )

     

    This will insert a row into a collection (colNegativeResponse) if the negative response is selected for that control. It will also remove it, if the value is reverted.

     

    Then you can simply do a IsEmpty(colNegativeResponse) or CountRows(colNegativeResponse) function to figure out if you have any negative responses (or how many).

     

    You can elaborate on this logic, as needed, but this will account for your 30+ values.

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Questionasking ,

    Do you mean that:
    1)all items are selected for OK and/or N/A, savebutton will be visible?

    2)if the user selects one or more Defects, Double check radio button to be visible?

    3)for double check radio button, if they select "Yes", then the savebutton appears

                                                         if they select "No", then camerabutton to appear?

    If so, I've made a similar test for your reference:

    1)gallery named Gallery1, radio inside gallery named Radio1(["OK","N/A","Defect"]), radio outside gallery named Radio2( ["Yes","No"])

    2)set Radio1's Items:

     

    ["OK","N/A","Defect"]

     

    Radio1's OnChange:

     

    Reset(Radio2)

     

    3)save button's Visible:

     

    If(
     (IsEmpty(
     Filter(
     Gallery1.AllItems,
     "Defect" = Radio1.SelectedText.Value
     )
     ) || //no "Defect"
     Radio2.SelectedText.Value = "Yes" //radio select yes
     ) && 
     IsEmpty(
     Filter(
     Gallery1.AllItems,
     IsBlank(Radio1)
     )
     ), //all items has selected selection
     true,
     false
    )

     

    4)Radio2's Items:

     

    ["Yes","No"]

     

    Radio2's Visible:

     

    If(
     !IsEmpty(
     Filter(
     Gallery1.AllItems,
     "Defect" = Radio1.SelectedText.Value
     )
     ) && //select "Defect"
     IsEmpty(
     Filter(
     Gallery1.AllItems,
     IsBlank(Radio1) 
     )
     ), //all items has selected selection
     true,
     false
    )

     

    5)camera button's Visible:

     

    Radio2.SelectedText.Value="No"

     

    923.gif

     

     

     

    Best regards,

  • Questionasking Profile Picture
    116 on at

    @v-yutliu-msft wrote:

    Hi @Questionasking ,

    Do you mean that:
    1)all items are selected for OK and/or N/A, savebutton will be visible?

    2)if the user selects one or more Defects, Double check radio button to be visible?

    3)for double check radio button, if they select "Yes", then the savebutton appears

                                                         if they select "No", then camerabutton to appear?

    If so, I've made a similar test for your reference:

    1)gallery named Gallery1, radio inside gallery named Radio1(["OK","N/A","Defect"]), radio outside gallery named Radio2( ["Yes","No"])

    2)set Radio1's Items:

     

     

    ["OK","N/A","Defect"]

     

     

    Radio1's OnChange:

     

     

    Reset(Radio2)

     

     

    3)save button's Visible:

     

     

    If(
     (IsEmpty(
     Filter(
     Gallery1.AllItems,
     "Defect" = Radio1.SelectedText.Value
     )
     ) || //no "Defect"
     Radio2.SelectedText.Value = "Yes" //radio select yes
     ) && 
     IsEmpty(
     Filter(
     Gallery1.AllItems,
     IsBlank(Radio1)
     )
     ), //all items has selected selection
     true,
     false
    )

     

     

    4)Radio2's Items:

     

     

    ["Yes","No"]

     

     

    Radio2's Visible:

     

     

    If(
     !IsEmpty(
     Filter(
     Gallery1.AllItems,
     "Defect" = Radio1.SelectedText.Value
     )
     ) && //select "Defect"
     IsEmpty(
     Filter(
     Gallery1.AllItems,
     IsBlank(Radio1) 
     )
     ), //all items has selected selection
     true,
     false
    )

     

     

    5)camera button's Visible:

     

     

    Radio2.SelectedText.Value="No"

     

     

    923.gif

     

     

     

    Best regards,


    None of my questions are in a gallery, they are all on one canvas app with radio buttons, the design i had to replicate made the app to be made this way.

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Questionasking ,

    So you did not display question list in one gallery?
    Then how do you display those questions? By using what controls?
    Sorry that I could not image your app's design.

    Could you show me screen shoot of your app to help me understand?

     

     

    Best regards,

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Questionasking ,

    I've found that you posted another issue.

    I've answered you in that issue, please refer that:
    https://powerusers.microsoft.com/t5/Building-Power-Apps/Visible-Variables-multiple-conditions/td-p/699557

     

     

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard