In Listbox, I can call user defined function like Get_name( field->Customer_code ).
How to do similar thing in XBrowse? like COLUMNS "DOC_DATE", "Get_name( Customer_code )", but it does not work
Thanks in advance.
Marcelo Via Giglio wrote:Hola,
try to use code block COLUMNS "DOC_DATE", {|| Get_name( Customer_code ) }
regards
Marcelo
COLUMNS "DOC_DATE", "Get_name( Customer_code )"
COLUMNS "DOC_DATE", {|| Get_name( Customer_code ) }
#include "fivewin.ch"
static aStates
function Main()
USE STATES SHARED
aStates := FW_DbfToArray()
CLOSE STATES
USE CUSTOMER NEW SHARED
XBROWSER "CUSTOMER" COLUMNS "State", "StateName(STATE)", { || StateName(FIELD->STATE) } ;
SETUP oBrw:cHeaders := { "State", "Name1", "Name2" }
return nil
function StateName( cCode )
local nAt := AScan( aStates, { |a| a[ 1 ] == cCode } )
return If( nAt == 0, Space( 20 ), aStates[ nAt, 2 ] )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 37 guests