Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to have some values read as literals while others should be replace by the variable value.
Example Input file:
So when I do this the first four ID’s come as I want which is literal. However I want the fifth one to show as ‘111’,’222’,’333’
Variable Output I Get
v_ID1 = ‘111’
v_ID2 = ‘222’
v_ID3= ‘333’
v_ID4= ‘444’
v_ID5= $(v_ID1),$(v_ID2),$(v_ID3)
My script is like this:
Test:
LOAD
Type,
Variable,
$(vVariableValue) //NOTE I do have this variabalized but for the input file examples sake I kept just to loading from one example to keep it simpler
FROM
'..\includes\File1.xlsx'
(ooxml, embedded labels, table is Sheet1) ;
LET vNumberofRows = NoOfRows ('Test');
For vI = 0 to (vNumberofRows - 1);
LET vVariable= Peek('Variable',vI,'Test');
LET vValue= Peek ('$(vVariableValue)',vI,'Test');
LET [$(vVariable)] = Peek ('$(vVariableValue)', vI, 'Test') ;
Next;
Do I Need to do some sort of IF logic inside of the loop to treat these differently?
I just can’t seem to get the syntax to work
Also note, I am trying to do this without minimal changing of the source excel file format.
Hi,
Are you ok to give the input for v_ID5 like below
Type | Variable | VariableValue |
Single | v_ID1 | '111' |
Single | v_ID2 | '222' |
Single | v_ID3 | '333' |
Single | v_ID4 | '444' |
Multiple | v_ID5 | =v_ID1&','&v_ID2&','&v_ID3 |
you will get
And, i did small change in your script. Check the Attachment