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.