I'm using xBrowse and it freezes up with the following statement:
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.
COLUMNS {"Number", "Name", TRANSFORM(Phone, "@R (999) 999-9999")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
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" ;
....
Richard, Rao:
Thank you very much.