Hopefully this is a fairly simple one for someone but I cant get my head round it.
I have a pop up (PopUpThreeQuotes) where I have set its Visible property to: ShowPopUpThreeQuotes
I also have a data card (ThreeQuotes) and set its Visible property to: ShowThreeQuotes
I have built it so when the toggle AnnualOrder is set to true the Pop Up and Data Card will be made visible
If(
AnnualOrder.Value = UpdateContext({ShowThreeQuotes: false}),
UpdateContext({ShowThreeQuotes: true}) & UpdateContext({ShowPopUpThreeQuotes: true})
);
The pop up has a button whose OnSelect turns the visible property of the pop up to false: UpdateContext({ShowPopUpThreeQuotes:false})
This all works as I would like.
I am trying to add in if a data card (TotalCost) has a value > 999.99 then the same actions happen as above.
Value(TotalCost.Text) > 999.99,
The pop up and data card needs to be visible if either condition is met they are not dependant. But I need to be able to remove the pop up and keep the data card.
Many thanks
Hi @StewG,
How about this for a method...
As the datacard is entirely dependent on the toggle being true or the value of TotalCost being above 999.99, use this formula for the Visible property of the DataCard:
AnnualOrder.Value Or Value(TotalCost.Text) > 999.99
Then you can control the visibility of the popup with one variable.
Set the OnCheck property of the toggle to:
UpdateContext({ShowPopUpThreeQuotes: true})
Set the OnUncheck property of the toggle to:
UpdateContext({ShowPopUpThreeQuotes: false})
Set the Visible property of the popup to:
ShowPopUpThreeQuotes
And finally the button OnSelect property to:
UpdateContext({ShowPopUpThreeQuotes: false})
Hope that works for you!
Sorry @StewG, there is one piece missing - triggering ShowPopUpThreeQuotes to true when the label has a value > 999.99
Is there some sort of event that you could place this formula on?
If(Value(TotalCost.Text)>999.99, UpdateContext({ShowPopUp: true}))
Perhaps the OnVisible of the screen, or the OnSelect of an item in a gallery?
Hi @hantsjoel
The formulas for triggering the pop up with the Annual Order toggle work great.
The issue I am still struggling with is getting the pop up to show when the below formula is used.
If(Value(TotalCost.Text)>999.99, UpdateContext({ShowPopUpThreeQuotes: true}))
I have tried placing it in the screens OnVisible and in the OnSelect of other items in the gallery which are mainly dropdowns. I have even tried putting it in the OnSelect of the navigation button on the previous screen, but no luck.
Its a real head scratcher!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
49 | |
41 | |
30 |
User | Count |
---|---|
266 | |
121 | |
94 | |
90 | |
81 |