Address field stored in the database:
House No-999,Sector-343,Mayhelm Street,PostOffice,657466The code to be written inside the formulae editor for @address formulae field to display the address after splitting is given below
stringVar array x := split({Tablename.Addressfield},",");
Local numberVar i;
Local stringVar outputString := "";
For i:=1 to Count(x) do
(
outputString := outputString + x[i] + Chr(10)
);
outputString;
The outputString is the result which is the wanted address in the format given belowLocal numberVar i;
Local stringVar outputString := "";
For i:=1 to Count(x) do
(
outputString := outputString + x[i] + Chr(10)
);
outputString;
House No-999,
Sector-343,
Mayhelm Street,
PostOffice,
657466
Explanation of the code:Sector-343,
Mayhelm Street,
PostOffice,
657466
The address field from the database is first of all split using the function Split(field,delimiter) in the formula editor.This is stored in an array and then iterated and concatenated one by one to the outputString.The Chr(10) used is to jump to new line after printing each strings seperated after comma.
7 comments:
Thank you very much...it saved my time a lot
If I use this formule for my string which is seperated by a semicolon, the outcome will look like this:
text1
text2
text3
text4
I like to have the outcome started at some point for each line
How to?
I see the outcome in my comment is not correct, he striped out the spaces
text1
text2
text3
text4
Thank You Very Much...
Greate Brother i like so much and lot of thanks................
A lot of thanks brother............
NICE 高大上
Post a Comment