concatenate fields

Sarah Reichelt sarah.reichelt at gmail.com
Mon Jun 30 23:38:49 EDT 2008


On Tue, Jul 1, 2008 at 12:44 PM, william humphrey <shoreagent at gmail.com> wrote:
> Good evening and, as always, thanks for the help
>
> What's the best way to concatenate three fields to make one text string with
> spaces between the words when you don't know how many or which of the three
> fields will contain data and you don't want extra spaces in the result?

put empty into tConcat
if field "One" is not empty then put field "One" & space after tConcat
if field "Two" is not empty then put field "Two" & space after tConcat
if field "Three" is not empty then put field "Three" & space after tConcat
delete last char of tConcat

Cheers,
Sarah



More information about the use-livecode mailing list