Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
Is that possible to hold more than one value into a single variable?
LET vNow=Now();
LOAD_ON_REQUES_CONFIG:
LOAD * INLINE [
RunDateTime, NumberOfMonths, LoadFlag
$(vNow), 12, 0
$(vNow), 18, 0
$(vNow), 24, 0
];
Now I want to hold 12, 18, 24 (these 3 values) into a single variable vNumberOfMonths. Is that possible?
Hi Kumar,
Please check if this would suffice your requirement....leaving trigger option.
Set trigger to select multiple values in a field from a variable
Thanks,
Vish.
LET vNow=Now();
LET vNumberOfMonths='12;18;24';
LOAD_ON_REQUES_CONFIG:
LOAD *,Evaluate(NumberOfMonths) INLINE [
RunDateTime, NumberOfMonths, LoadFlag
$(vNow), "Subfield('$(vNumberOfMonths)',';',1)", 0
$(vNow), "Subfield('$(vNumberOfMonths)',';',2)", 0
$(vNow), "Subfield('$(vNumberOfMonths)',';',3)", 0
];
Hi
I do not fully understand your requirement, but this will make your script sample work:
LOAD_ON_REQUES_CONFIG:
LOAD Now() As RunDateTime,*
INLINE [
NumberOfMonths, LoadFlag
12, 0
18, 0
24, 0
];
HTH
Jonathan
A variable can only store one value at a time (but can be overwritten anytime). You can store multiple values in a variable by concatenating single values...but I doubt that this will help you.
I guess it would look similar to this:
LET vTest = peek('NumberOfMonths',0,'LOAD_ON_REQUES_CONFIG') &', '& peek('NumberOfMonths',-1,'LOAD_ON_REQUES_CONFIG') &', '& peek('NumberOfMonths',-2,'LOAD_ON_REQUES_CONFIG');