Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Jose F Zouain" Newsgroups: comp.lang.clipper.visual-objects Subject: Help on saving an array element to table Date: 27 May 2017 00:20:15 GMT Lines: 45 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: individual.net 4Gl0CnMs1juQeM4mRAXW3wsGBVwW6Hw6aOqwgeDRenuWcO8v9T Cancel-Lock: sha1:cOEjDi464scGSfvjadz8MCHqsfk= User-Agent: XanaNews/1.18.1.5 Xref: csiph.com comp.lang.clipper.visual-objects:10606 Hi Guys I am still rusty, don't know why is giving me an error. Have a multi-dimension array, all elements are string: aTranscod :={{"Purchase Order","PO"},; {"Invoice","IN"},; {"Return Sales","SR"},; {"Sales Order","SO"},; {"Repair Order","RO"},; {"Out Rental","RT"},; {"In Rental","RI"}} Already have the value in mememory for the first element of the 7 values in the array which is SELF:oDCTRANSCOD:TextValue Now I want to save the second element to the table, this is what I am doing and is giving me an error: LOCAL n AS DWORD n := AScan(aTranscod, SELF:oDCTRANSCOD:TextValue) The ascan should return a value Then want to save the second element of the value to the Table SELF:oDBServer:FIELDPUT(#TRANSCOD, aTranscod[n,2]) I think I am scanning incorrent the array, the value in memory whic is SELF:oDCTRANSCOD:TextValue, can be Purcase Order, Invoice, etc. I did this and is giving me a compiled error: n := AScan(aTranscod, {|aVal| aVal[2] = SELF:oDCTRANSCOD:TextValue}) Want to save for Sales Order, "SO" in #TRANSCOD Some help please, thanks Jose --