Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The &' '& is not working.
somebody help...... ?
Thanks,
for vVariableNo = 0 to NoOfRows('POLIST')
Let vPO = $(vPO) &' '& FieldValue('PO',vVariableNo);
next vVariableNo
POLISTConcat:
Load Concat(Distinct PO,',') AS POConcat
Resident
POLIST;
is a new table by concatenating the all the PO field values with comma separator.
Did you checked it out how it works?
Hi
try like this
Let vPO = 'test';
for vVariableNo = 0 to NoOfRows('POLIST')
vPO = vPO &' '& FieldValue('PO',$(vVariableNo));
next vVariableNo
Hope it helps
Hi Mayil,
but i don't want test in my string.
I'm trying to put all the po number into variable by coma deliminator.
and i will use this to loop in my load script.
so i don't have to hardcode my PO number.
so. the result should be...
1234, 2345, 3454
Hi
Let vPO = '';
for vVariableNo = 0 to NoOfRows('POLIST')
vPO = vPO &','& FieldValue('PO',$(vVariableNo));
next vVariableNo
vPO = right(vPO,len(vPO)-2);
Hope it helps
Try with this
POLISTConcat:
Load Concat(Distinct PO,',') AS POConcat
Resident
POLIST;
LET vPO = FieldValue('POConcat',1);
DROP Table POLISTConcat;
Mayil,
Sorry, i didnt see you remove the dollor sign. so it works.
i do it like this though.
Let vPO = Text(FieldValue('PO', vVariableNo)) &','& (vPO)
vPO cant be in front, it create some empty value. so i do it at the back.
Thanks
LET vPO = FieldValue('POConcat',1); will only give one value isnt it?
as i understood. the 1 represent the row?
POLISTConcat:
Load Concat(Distinct PO,',') AS POConcat
Resident
POLIST;
is a new table by concatenating the all the PO field values with comma separator.
Did you checked it out how it works?
HI
Returns the field value found in position n of the field fieldname (by load order). Fieldname must be given as a string value, e.g. the field name must be enclosed by single quotes. The first field value is returned for n=1. If n is larger than the number of field values, NULL is returned.
Yes,
FieldValue('POConcat',1); gives first value...
Use Celambarasan suggestion also, its easy know...
Yes, i have problem with the loop, because at the end of the loop, i always get and empty value...
So i'm using the concat function.. i didn't know it works this way...
But thanks gentlemen for your help.