Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

Rules, visibility and If statements

Hi All,


I am have a screen which contains buttons to other screens. I am using rules, that once the questions are complete, the button goes green to let them know they have completed it. This is working great. Ace.


However, I have one button which goes onto another screen with buttons for questions to fill in (dependent on previous choices in the app).


I will attach photos to help explain.


Basically my rules work for these sub buttons to turn green when the relevant questions are completed. (rule based on visibility of a tick showing on the questions) However, I need my initial screen button to go green IF the buttons visibilty on the other screen is true & the green rule is true.


The button I need to go green on the initial screen is called WorkTypeQuestion.


The second image is the second screen which has visibility rules applied to the buttons if previously chosen and will go green if the questions are complete. The screen has 7 different buttons. 

Really hope this makes sense.


Can't seem to find If statements working in the conditions of rules. 


Any ideas?


Thank you...

Solution Sage
Solution Sage

Re: Rules, visibility and If statements

Hello Laura,

It would be helpful if can you share the expressions that you use on the visible and fill property of the buttons.
In general, I think that you need to copy and compine the expressions from the properties Visible and Fill of the buttons in the second screen to the Visible property of the button WorkTypeQuestion in the initial screen.

Community Support
Community Support

Re: Rules, visibility and If statements

Hi @LauraEmberson,


Could you please share a bit more about the rules that you mentioned?

Could you please show more details about the formula that you provided within the Visible property and Fill property of the Button controls within your second screen?


I agree with @Mike8's thought almost. You could consider take a try to apply the expressions from the properties Visible and Fill of the buttons in your second screen into the Visible property of the button WorkTypeQuestion in the initial screen


I assume that there are three buttons within your second screen, you want the WorkTypeQuestion button to go green when the green rule of three buttons is true.


I have made a test on my side, please take a try with the following workaround:4.JPG





If you want to achieve your needs using rules, please take a try with the following GIF screenshot:Test1.gif


Within the Conditions box of the above Rule, type the following formula:


Note: On your side, you should use your own Green color instead of the Color.Green within above formula.


In addition, you could also consider take a try with following workaround (instead of using Rules):


Set the Fill property of the WorkTypeQuestion button to following formula:

RGBA(255, 255, 255, 1) )

Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advocate II
Advocate II

Re: Rules, visibility and If statements

Hi Both,



thank you for your help. The problem is I have 7 buttons which could be chosen with any combination.  (Eg, button 2&5 or 3&5 or 1234 etc etc). Therefore it needs to recognise if those buttons are visible/chosen and green to then turn the 'Work Type Question' green. 


The visibility on the 7 buttons are as follows:

If("Mains" in DataCardValue10.SelectedItems.Value,true,false)


So the user can only enter the question section if chosen previously from a choice column. This all works fine. THEN if those questions are chosen and completed a tick will appear. The Buttons leading to the questions (Screen 2) currently have forumlas such as:






(ie if all not blank go green)


So I need the first screen button to recognise first if the button is visibility ON and if it is, whether the button is green.



Hoping this is clearer now?

Thank youuu.


Helpful resources


New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,738)