Page 1 of 1

Maintain space between field entries.

Posted: Fri Aug 01, 2008 6:41 am
by keyless
I have a field where user will enter several file extension (without the "."). I'm drawing a blank as to how to make sure each one is separated by only one space.

I'm thinking basically on closeField I want to replace any consecutive spaces greater than 1 with a single space.

Re: Maintain space between field entries.

Posted: Fri Aug 01, 2008 7:21 am
by keyless
keyless wrote:I have a field where user will enter several file extension (without the "."). I'm drawing a blank as to how to make sure each one is separated by only one space.

I'm thinking basically on closeField I want to replace any consecutive spaces greater than 1 with a single space.
Somthing like this I suppose, but suspect it needs a repeat of some sort.

on closeField
put me into aString
replace (space & space) with " " in aString
put aString into me
end closeField

Posted: Fri Aug 01, 2008 8:19 am
by keyless
found this worked great.

put replaceText(fld "extent"," +"," ") into fld "extent"