Page 1 of 1

loading the data info from dbf

Posted: Wed Jun 23, 2021 10:24 am
by Silvio.Falconi
I load in the aItems array first a line that I need for the umbrella info, then I load the services in the same array aItems

Code: Select all | Expand


aItems:=AddFirstRecord()
aItems := oRigheInvoice:DbfToArray( cItemFlds, { || FIELD->Invoice ==alltrim(nInvoice) } )


the problem is that
aItems := oRigheInvoice:DbfToArray( cItemFlds, { || FIELD->Invoice ==alltrim(nInvoice) } )

delete everything in aItems
how should i not delete what it finds in aItems?

Re: loading the data info from dbf

Posted: Wed Jun 23, 2021 10:31 am
by Silvio.Falconi
Now I correct with

aItems:=AddFirstRecord(...)
aRighe:={}
aRighe := oRigheInvoice:DbfToArray( cItemFlds, { || FIELD->Invoice ==alltrim(nInvoice) } )
for n= 1 to len(arighe)
aadd( aItems,aRighe[n])
next

but is it correct to do it this way?