FW 13.09 xBrowse hangs

Post Reply
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

FW 13.09 xBrowse hangs

Post 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.
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: FW 13.09 xBrowse hangs

Post 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
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FW 13.09 xBrowse hangs

Post 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" ;
....
Regards

G. N. Rao.
Hyderabad, India
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: FW 13.09 xBrowse hangs

Post by HunterEC »

Richard, Rao:

Thank you very much.
Post Reply