Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a variable in back end like
Let _Var = '=GetFieldSelections(Num_Month)';
Now i want to use it in my Load statement for example like below:
Load
ID,
Num_Month,
if($(_Var) = Num_Month,'Match','Not Match') as _Status
From Excel........
But i am not getting the desired result .....????
Is it possble to use it like this ..........???
please help
Hi manish05,
To use a variable, you have tu put it into $(), in your exemple:
Load
ID,
Num_Month,
if( $(_Var) = Num_Month,'Match','Not Match') as _Status
but as you have initialized your variable before the load, I suppose you the condition you want is:
if( Num_Month= $(_Var),'Match','Not Match') as _Status
Still Not working
Hi
Using a Let statement produces a string. So the variable expands to the string. Change that to a set without the quotes:
Set _Var = =GetFieldSelections(Num_Month);
(the double = signs are not a typo!)
This will produce a variable whose value is the field selection. I that what you are expecting?
Hope that helps
Jonathan
What is the complete script? Does the filed Num_Month exists in your excel file?
Actually, the function GetFieldSelections() is not available to be used in the script, so if you use GetFieldSelections() to set the variable in the script it won't work.
But that will not produce useful value when used here.
If($(_Var) = Num_Month,'Match','Not Match') as _Status
What are you trying to compare with Num_Month?
Jonathan
PS and bobbyraj is right, GetFieldSelections does not work in script
But when i am using _Var in front end in the Text Obejct it is giving me the correct result , then why i can not use it in back end just below few lines after declaring the variable