FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FW 13.09 xBrowse hangs
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
FW 13.09 xBrowse hangs
Posted: Mon May 05, 2014 08:17 AM
Guys:

I'm using xBrowse and it freezes up with the following statement:
Code (fw): Select all Collapse
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.
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: FW 13.09 xBrowse hangs
Posted: Mon May 05, 2014 02:54 PM

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FW 13.09 xBrowse hangs
Posted: Wed May 07, 2014 06:24 AM

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
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: FW 13.09 xBrowse hangs
Posted: Thu May 08, 2014 01:33 AM

Richard, Rao:

Thank you very much.

Continue the discussion