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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,937)