Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am stuck with a problem. Tried to find the solution on community but couldnt get.
I have a variable wherein i have a value for eg 94.5.
Now i have two fields MinRange and MaxRange as follows:
i have another fields Score and X_VAL
I need to check the range wherein the value 94.5 lies and accordingly display its score.
In the script, you can generate the "between" values in increments of .01 as a new field "Index". And then choose a Score from the table using a rounding of the variable like:
Only({<Index={$(=round($(vInput),.01))}>}Score)
See attached example.
-Rob
Take a look at intervalmatch. IntervalMatch
HIC
But the value i want to compare is stored in a variable. and that variable is calculated in frontend.
So how will i compare a variables value with 2 fields??
Then you need to express it with functions. One way is to use a nested If()-function - one If() per range.
Alternatively, you can use the class()-function. Or you can combine the two:
If(Variable<85,'Below',
If(Variable>=100,'Above',
Class(Variable,3, 'var', 1)
))
HIC
In the script, you can generate the "between" values in increments of .01 as a new field "Index". And then choose a Score from the table using a rounding of the variable like:
Only({<Index={$(=round($(vInput),.01))}>}Score)
See attached example.
-Rob
Simple correction:
"While (MinRange + (Iterno()*.01))-.01 < MaxRange" -> This should be <=MaxRange in order to consider the border case for Max Ranges