cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_jc
Regular Visitor

Evaluate changed value in Text Input and click the appropriate Radio

I have tried six ways to Sunday to get this to work and the most reasonable NON-working solution is this:

 

2 objects:  txtEstimatedImpact (Text Input) and optGrtr5K_50K (Radio)

1 variable:  varEstImpact

 

Screen

OnVisable = 

Reset(txtEstimatedImpact)

(varEstImpact,"")

 

txtEstimatedImpact

Default = ""

OnChange =

If(Value(txtEstimatedImpact.Text)>=50000,UpdateContext( { varEstImpact: ">=$50,000" } ),
If(Value(txtEstimatedImpact.Text)>=5000,UpdateContext( { varEstImpact: ">=$5,000" } ),
UpdateContext( { varEstImpact: "" } )));Reset(optGrtr5K_50K)

 

optGrtr5K_50K

Items = [">$5,000",">$50,000"]

Default = varEstImpact

 

In image below, it shows the results I'm looking for. 

  1. Default value is "" > no radio buttons selected,
  2. Enter anything less that 5000 > no radio buttons selected,
  3. Enter anything between 5000 and 49999.99 > the option named ">$5,000" is selected, and 
  4. Enter anything equal to or above 50000  > the option named ">$50,000" is selected

If manually select one of the two option buttons, then change anything in the text box, the option buttons reset to both unchecked.  This is expected on screen entry because the variable is set to "".  After entering text though, it seems the variable is never updated (even though it is).

 

See the design mode image showing the current value in memory.

 

I also tried not using a variable, but this is also without formula errors, but doesn't work.

 

If(Value(txtEstimatedImpact.Text)>=50000,">=$50,000",
If(Value(txtEstimatedImpact.Text)>=5000,">=$5,000",
""))

 

Any help would be greatly appreciated.  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

Unless there is a typo in the information you provided, here is what you said:

 

 

  • Enter anything between 5000 and 49999.99 > the option named ">$5,000" is selected, and 
  • Enter anything equal to or above 50000  > the option named ">$50,000" is selected

 

But your formula is reading ">=$5,000" and not ">$5,000"

 

If(Value(txtEstimatedImpact.Text)>=50000,">=$50,000",
If(Value(txtEstimatedImpact.Text)>=5000,">=$5,000",
""))



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
JR-BejeweledOne
Super User
Super User

Unless there is a typo in the information you provided, here is what you said:

 

 

  • Enter anything between 5000 and 49999.99 > the option named ">$5,000" is selected, and 
  • Enter anything equal to or above 50000  > the option named ">$50,000" is selected

 

But your formula is reading ">=$5,000" and not ">$5,000"

 

If(Value(txtEstimatedImpact.Text)>=50000,">=$50,000",
If(Value(txtEstimatedImpact.Text)>=5000,">=$5,000",
""))



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

_jc
Regular Visitor

JR, that was it.  How dumb?!!  Get the formula correct and mis-reference the object.  YIKES!

Thank you so much.

JR-BejeweledOne
Super User
Super User

No worries, it happens!   A misplaced paren, a missing curly brace or comma, it happens to all of us.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

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 Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,403)