I wanted to list a set of strings in each line of a text field however, i always get the "; " string. how can i omit this?
sample set (taken using dblookup):
10; 11; 12; 13
i tried using for loop to display each string on a field at different lines but instead i got this:
10
; 11
; 12
; 13
what code shall i use to display the results without the "; "? Thanks!
Subject: Help with @subset
can you tell me your code .I guess i can help you
Subject: RE: Help with @subset
scrap my previous post… anyway, here’s my code
tmp_person:=@DbLookup(“”:“NoCache”;ictserver:ictdatabase;ictview;tmp_id;5);
tmp_person now has lists of values, namely:
Kevin; Donald; Gwen; Todd
then i used this code to display them on a text field, each on a new line…
FIELD ICT_PER:=tmp_person + @NewLine
however, field displays:
Kevin
; Donald
; Gwen
; Todd
I wanted to omit the "; "… I am kinda new with this thing, so i don’t have idea yet.
Thanks!
Subject: RE: Help with @subset
-
remove the @newline from the line of code:FIELD ICT_PER:=tmp_person;
-
Make the field ICT_PER multivalue (1st tab field properties, select “Allow multiple values”)
-
On the 3rd tab of the field properties, at “Display seperate values with” select “New Line”
If you want to keep the value ICT_PER as one string (so not multivalue) you can use:
FIELD ICT_PER:= @implode(tmp_person;@NewLine)
Regards,
René
Subject: RE: Help with @subset
yep already got it. hehe thanks for the response! i already did modify the values in the tabs, but i prefer the implode command. thanks!!!
Subject: Help with @subset
Try this… I have not checked this. I guess it will help you out.
@Explode(string ; separators) Converts a text string into a text list; the second parameter specifies the separators (except newlines) for elements in the string.