Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
AngieO2019
Contributor II
Contributor II

Variables in Edit Script

Hello.

I'm currently trying to tag Years as 'Include'. The premise is that the user will select an option in the check box, and it will tag the years depending on the selection in the check box.

 
 

Variables.png

But it seems that I am not getting the value of the variable in the if statements, thus not tagging the Year accordingly.

 

Here's my syntax:

Set vIncludeYear = '=GetFieldSelections(Checkbx_Scenario)';

LOAD

ID,

if('$( vIncludeYear)' = 'Include Current Year' and Year(today())+1 = [Year Due] , Dual('Include',1),

if('$( vIncludeYear)' = 'Top Risk Year') and RangeFractile([Year Due Score], 0.10, Dual('Include',1))) as IncludeTag

Labels (3)
1 Reply
rubenmarin

Hi, you can't access field selections from script but you can access variable values.

As a workaorund you can add a button to add years to a variable, and use this variable in script.

You can also use triggers on Checkbx_Scenario field selections to assign values to a variable.