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.
_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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,332)