cData in this case "document" is the fieldname that is used to search for : value is 12345
this works great for 1 field values but i also need this for a combination field like
upper(document)+upper(paid). The index is already build for the 2 var's but I can't get them correct in the cData from the function MyScope
- Code: Select all Expand view RUN
- oBrw[2]:bChange := { || MyScope("factinfo","document","factart","factart"),oBrw22:refresh() }
oBrw[2]:bChange := { || MyScope("factinfo","upper(document)+upper(paid)","factart","factart"),oBrw22:refresh() } // off cource this does not work, but this is how I would like to use it
function MyScope(cParent,cData,cChild,cChildTag)
LOCAL cZoekdata:= upper( (cParent)->&cData)
LOCAL aScope1, aScope2
DEFAULT cFoto:=""
if cZoekdata = sys_scope
return NIL
endif
sys_Scope = cZoekdata
(cChild)->(dbsetorder(cChildTag))
(cChild)->(ORDSCOPE(0, "" ) )
(cChild)->(ORDSCOPE(1, "" ) )
(cChild)->( ORDSCOPE(0, cZoekData ) )
(cChild)->(ORDSCOPE(1, cZoekData ) )
(cChild)->(DBGOTOP())
Return NIL