Page 1 of 1
FW 13.09 xBrowse hangs
Posted: Mon May 05, 2014 8:17 am
by HunterEC
Guys:
I'm using xBrowse and it freezes up with the following statement:
Code: Select all
COLUMNS {"Number", "Name", TRANSFORM(Phone, "@R (999) 999-9999")
If I do not use the TRANSFORM function, xBrowse works with no problems. Any ideas ?
Thank you.
Re: FW 13.09 xBrowse hangs
Posted: Mon May 05, 2014 2:54 pm
by Richard Chidiak
You shoud try it this way
COLUMNS {"Number", "Name", {TRANSFORM(Phone, "@R (999) 999-9999")} }
or a much better way
COLUMNS {"Number", "Name", "Phone"}
IF oBrw:oCol("phone") # nil // we refer to the header name not the column name, assuming the header name is phone also
oBrw:oCol( "phone" ):cEDITPicture := "@R (999) 999-9999")"
ENDIF
Hth
Richard
Re: FW 13.09 xBrowse hangs
Posted: Wed May 07, 2014 6:24 am
by nageswaragunupudi
When we use COLUMNS clause, each expression in the list can be either a character value or a codeblock. If it is character value, it can be either a field name or a character expression that can be macro evaluated inside xbrowse.
So, the following two alternatives work:
COLUMNS {"Number", "Name", { || TRANSFORM(Phone, "@R (999) 999-9999")} }
or
COLUMNS {"Number", "Name", "TRANSFORM(Phone, '@R (999) 999-9999')" }
if Phone is a fieldname.
But the best way is :
COLUMNS "Number", "Name", "Phone" ;
PICTURES nil, nil, ""@R (999) 999-9999" ;
....
Re: FW 13.09 xBrowse hangs
Posted: Thu May 08, 2014 1:33 am
by HunterEC
Richard, Rao:
Thank you very much.