DCBROWSE AND MY PROBLEM
Posted: Sat Jan 04, 2025 4:45 pm
Hi Roger,
I can't seem to find a solution. Please help.
How to retrieve the name of the DBF field being edited
from function: AFTER_EDITING(oBrowse)
DCBROWSE oBrowse ALIAS "TEST";
EDIT xbeBRW_ItemSelected ;
ACTION {|| AFTER_EDITING(oBrowse) }
DCBROWSECOL FIELD TEST->ID_NAME CARGO "ID_NAME" PARENT oBrowse
AFTER_EDITING(oBrowse)
oColon := oBrowse:getcolumn(ncol)
_cargo_ := var2char( oColon:CARGO[3] )
msgbox(_cargo_) //--> "ID_NAME"
return nil
Is there ANOTHER more elegant way without using CARGO
I'm confused by THIS, that in the same function it is possible to add a NEW column
to oBrowse by writing the name of the dbf field TEST->FLAG into the oXbpColumn object:
oXbpColumn := XbpColumn():new()
oXbpColumn:dataLink := {|| TEST->FLAG }
oXbpColumn:create()
oBrowse:addColumn( oXbpColumn )
I am convinced that there must be a way to get the DBF field name "FLAG"
without using CARGO. But I can't find it.
I can't seem to find a solution. Please help.
How to retrieve the name of the DBF field being edited
from function: AFTER_EDITING(oBrowse)
DCBROWSE oBrowse ALIAS "TEST";
EDIT xbeBRW_ItemSelected ;
ACTION {|| AFTER_EDITING(oBrowse) }
DCBROWSECOL FIELD TEST->ID_NAME CARGO "ID_NAME" PARENT oBrowse
AFTER_EDITING(oBrowse)
oColon := oBrowse:getcolumn(ncol)
_cargo_ := var2char( oColon:CARGO[3] )
msgbox(_cargo_) //--> "ID_NAME"
return nil
Is there ANOTHER more elegant way without using CARGO
I'm confused by THIS, that in the same function it is possible to add a NEW column
to oBrowse by writing the name of the dbf field TEST->FLAG into the oXbpColumn object:
oXbpColumn := XbpColumn():new()
oXbpColumn:dataLink := {|| TEST->FLAG }
oXbpColumn:create()
oBrowse:addColumn( oXbpColumn )
I am convinced that there must be a way to get the DBF field name "FLAG"
without using CARGO. But I can't find it.