Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a text object with concatenated fields, each preceded by a bullet point chr(8226). Sometimes the fields are empty, which is fine but I'd like the bullet point to be hidden too if that is the case. Is there a way to do this.
Currently it looks like this: Fieldname1&chr(13)&chr(8226)&Fieldname2
which produces:
But if Fieldname2 is empty it currently looks like this:
I'd like to have that emply bullet hidden. Is there an easy way to do this in set analysis?
Thanks.
you can use a if condition - something like below:
=if(Fieldname1<>'',chr(8226)&Fieldname1)&chr(13)&if(Fieldname2<>'',chr(8226)&Fieldname2)
you can use a if condition - something like below:
=if(Fieldname1<>'',chr(8226)&Fieldname1)&chr(13)&if(Fieldname2<>'',chr(8226)&Fieldname2)
That worked! Thanks!
Hi Bruce
Use this in your script:
Load *,
if(Len(Trim(Field2))>0,NewField,Replace(NewField,chr(8226),'')) AS FinalField;
Load *, Field1&chr(13)&chr(8226)&Field2 as NewField Inline [
Field1, Field2,
IN, INDIA
AUS, AUSTRALIA
USA,
CAN, CANADA
];
Also, see the Attachment.
Regards
Aviral Nag