FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse functionality
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
xBrowse functionality
Posted: Fri Nov 24, 2017 09:18 AM

Hello Rao ,

there are many methods to invoke a column :
oBrw:cHeader:Value
oBrw:oCol(cHeader ):Value
oBrw:aCols[1]:Value

is there a way to call a column with the name of the field?

Regards Maurizio

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse functionality
Posted: Fri Nov 24, 2017 02:52 PM

Search for a column whose :Expr is same as the field name

Regards



G. N. Rao.

Hyderabad, India
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: xBrowse functionality
Posted: Mon Nov 27, 2017 11:37 AM

Thanks Rao

oBrw:fCol('CODIVA')

METHOD fCol(cField) CLASS TXBrowse
Local n := 0

FOR n := 1 to len(::aCols)
IF HB_IsString(::aCols[n]:cExpr) .and. UPPER(::aCols[n]:cExpr) == UPPER(cField)
exit
ENDIF
next

return If( n > 0, ::aCols[ n ], nil )

Regards Maurizio

Continue the discussion