cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ramole
Post Prodigy
Post Prodigy

popup

Hi 

 

I have a code for to warn me when a field a number higher than it set but i would like to add extra formula like if selected from another dropdown choices example fedex or ups if morethan 50 the warning to show if not dont show and others like YRC or RRTS for 2801 here is the code, any help for the correct formula ?

 

Set(NeedsSaved,true); If("FedEx" in DataCardValue8.Selected.Value || "UPS" in DataCardValue8.Selected.Value , Value(inputCost_1.Text)>50, Set(alertVar, true), Set(alertVar, false));If("YRC" in DataCardValue8.Selected.Value Or "RRTS" in DataCardValue8.Selected.Value && Value(inputCost_1.Text)>2801, Set(alertVar1, true), Set(alertVar1, false)) 

 

Thanks 

Thank you
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @eka24 

 

The code was still popup any number entered but i have modified now and is working but thanks for your idea and help.

here is the code i have modified so it can be used for future anyone need it .

 

 

 

 

If("FedEx" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>50, Set(alertVar, true),


If("UPS" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>50, Set(alertVar, true),

If("RRTS" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>2800, Set(alertVar1, true)
,
If("YRC" in DataCardValue8.Selected.Value &&Value(inputCost_1.Text)>2800,Set(alertVar1, true)))))

Thank you

View solution in original post

7 REPLIES 7
rebeccas
Super User
Super User

I didn't test this but just looking I noticed this:

 

Set(NeedsSaved,true);

If("FedEx" in DataCardValue8.Selected.Value || "UPS" in DataCardValue8.Selected.Value && Value(inputCost_1.Text)>50, Set(alertVar, true), Set(alertVar, false));If("YRC" in DataCardValue8.Selected.Value Or "RRTS" in DataCardValue8.Selected.Value && Value(inputCost_1.Text)>2801, Set(alertVar1, true), Set(alertVar1, false)) 

Hi @rebeccas 

 

I have tested but the popup trigers all the time no matter what number you write?

 

Thanks

Thank you

Try and remove first Set(alertVar1, false)) of the formula @rebeccas gave :

Set(NeedsSaved,true);
If("FedEx" in DataCardValue8.Selected.Value || "UPS" in DataCardValue8.Selected.Value &&Value(inputCost_1.Text)>50, Set(alertVar, true),If("YRC" in DataCardValue8.Selected.Value Or "RRTS" in DataCardValue8.Selected.Value &&Value(inputCost_1.Text)>2801, Set(alertVar1, true), Set(alertVar1, false))

Hi @eka24 

 

Still popup warning comes for everything ? here the original code If(Value(TextInput1.Text)>50, Set(alertVar, true), Set(alertVar, false)) and would like to add if dropdown1 selected on FedEx and value  TextInput1.Text is more than >50 show popup otherwise do not show and other one YRC OR RRTS for TextInput1.Text is more than >2801 show popup otherwise do not show

 

Thanks 

 

 

Thanks 

Thank you
eka24
Super User III
Super User III

Please you have two pop ups?
Set(alertVar, true), Set(alertVar1, true)

eka24
Super User III
Super User III

I have made a test and it works:
1. OnVisible of the screen, set a variable : Set(alertVar,true)

2. Then put this formula on the visible propoerty pf the pop Up:

If("FedEx" in DataCardValue8.SelectedText.Value&&Value(inputCost_1.Text)>50
Or "UPS" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>50, alertVar,
If("YRC" in DataCardValue8.Selected.Value Or "RRTS" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>2801,
alertVar, !alertVar))
 
3.One thing i realised is kindly look at the usage of < and >. Because the augment of
inputCost_1 >50 and inputCost_1 > 2801 would be true for both at any point in time.
For Example any number that is inputCost_1 >50 would also be inputCost_1 > 2801.
As far as the formula is concerned, its ok
 

Hi @eka24 

 

The code was still popup any number entered but i have modified now and is working but thanks for your idea and help.

here is the code i have modified so it can be used for future anyone need it .

 

 

 

 

If("FedEx" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>50, Set(alertVar, true),


If("UPS" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>50, Set(alertVar, true),

If("RRTS" in DataCardValue8.Selected.Value&&Value(inputCost_1.Text)>2800, Set(alertVar1, true)
,
If("YRC" in DataCardValue8.Selected.Value &&Value(inputCost_1.Text)>2800,Set(alertVar1, true)))))

Thank you

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (57,791)