Omnis 7 Classic - Redefine List Update

Martin Obongita martin.obongita at yahoo.com
Wed Dec 14 18:33:19 UTC 2022


Hi List
I have an inherited Omnis Classic Library.
I am trying to update file values (table values) from variable values in a file(table) in an entry window..
These are the lines of commands I am running:
Set main file {F_F004E}Calculate VF4E_E1RSNNO as E1_RSNNOSet current list #L8Define list {VF4E_E1RSNNO,VF4E_RSNNO1..VF4E_RSNNO9,VF4E_RSNNO10..VF4E_RSNNO30,VF4E_CODE1..VF4E_CODE10,VF4E_CODE11..VF4E_CODE15,VF4E_CODE16..VF4E_CODE20,VF4E_CODE21..VF4E_CODE30,VF4E_RATE1..VF4E_RATE10,VF4E_RATE11..VF4E_RATE15,VF4E_RATE16..VF4E_RATE30,VF4E_PRDNO..VF4E_PRDMTH}     ;; VF4E_PRDMTHAdd line to listRedefine list {F4E_E1RSNNO,F4E_RSNNO1..F4E_RSNNO9,F4E_RSNNO10..F4E_RSNNO30,F4E_CODE1..F4E_CODE10,F4E_CODE11..F4E_CODE15,F4E_CODE16..F4E_CODE20,F4E_CODE21..F4E_CODE30,F4E_RATE1..F4E_RATE10,F4E_RATE11..F4E_RATE15,F4E_RATE16..F4E_RATE30,F4E_PRDNO..F4E_PRDMTH}     ;; F4E_PRDMTH;  For each line in list from 1 to #LN step 1Set read/write files {F_F004E}Set search as calculation {F4E_PRDNO=PRD_NO}Find on F4E_E1RSNNO (Exact match,Use search) {E1_RSNNO}If flag trueFor L1 from 1 to 30 step 1Calculate LVCOLLEN as len([con('F4E_CODE',L1)])Calculate LVTOTCOLLEN as LVTOTCOLLEN+LVCOLLENEnd ForIf LVTOTCOLLEN=0Clear range of fields F4E_CODE1 to F4E_RSNNO30End IfPrepare for editLoad from listElsePrepare for insertLoad from list {1}End IfUpdate files (Do not cancel pfu)If flag falseOK message (High position) {Unable to update record}End IfEnd ForSet read-only files {F_F004E}
If I step through the code, the file values are defined and populated from the list.
But the values are not updated after the Update files command.
What have I missed in my code?
I am sorry if the lines of code come through in a spaghetti.
Bear with me. 


RegardsMartin.


More information about the omnisdev-en mailing list