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.
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.
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:
If you want to achieve your needs using rules, please take a try with the following GIF screenshot:
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) )
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?
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.