Different text wants to see for different numerical inputs

I want to click on the “Check” button.
Different text wants to see for different numerical inputs.


That function will set “Description.Text” to “Sha” 40 times, and then set it to “Rif” 40 times if PR_val is visible.
That’s it.
It will always do those 80 assignments in a fraction of a second and leave “Rif” to be displayed if you click on the Check button.

What you want is irrelevant, this is what you currently do with that code.


I want,
If PR_val is from 0.1 to 0.5 print “Sha”
If PR_val is from 0.6 to 1.0 print “Rif”

How can I do that?

The you have to make the logic

If PR_val >= 0.1 and PR_val <= 0.5
set Description.Text to “Sha”
elseif PR_val >= 0.6 and Pr_val <= 1
set Description.Text to “Rif”
(that is the case if PR_val is less than 0.1, or between 0.5 and 0.6, or larger than 1)

The “for each” block is a loop, not a multi-choice conditional.

1 Like

Thank you for your feedback.
I tried with that rule also but PR_val can’t join with this logic.

PR_val needs to be a variable

1 Like

What is PR_val?
Is that a text block?
Then you need to use PR_val.Text.


I can’t solve it, still stuck with that.
Is there anyone who can fix that by TEAMVIEWER?

PR_val.Numbers Only is a TRUE/FALSE property of the PR_val component, whatever it is (a text box or a label).
“global PR_val” is NOT THE SAME as “PR_val” the text box. That they appear to have the same name does not make them the same.