Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a quite simple script and i need to create a specific key whit several Budget code.
There is no pb with code when I limit the load only with budget codes BD1 or BD2 and when i load only BRI code, but when i do a For i...with BD1, BD2, BRI, i have pb with BRI code and i don't understand why;
Champ introuvable - <Section 0 : >
F_COMPTA_BRI:
NoConcatenate
LOAD
[Section 0 : ] as CPT_KeyBRI_AXE1_,
'BRI' as TECH_CPTA_CodeBudget
Resident F_COMPTA_TEMP
I guess there is a pb with the loop and BRI code and the variables but i don't find way to solve it.
I try to find an issue since a moment and i am going to be crasy...
There is someone who can help me ?
Thank you by advance, and in attached files qvw and qvd data to reproduce the pb.
Franck
Franck,
fieldindex() and fieldvalue() functions are not accessing rows in a table, but distinct values of a field (in load order).
Field AXE1 shows multiple occurences of value AFF. So the field has only two distinct values, your third load will fail because there is no value for index 3.
You probably want to use peek() function instead, to address the value in the table, indexed by table row.
let Vaxe1BUD_$(VcodeBUD)=Peek('AXE1',$(i)-1,'PARAMBUD');
let Vaxe2BUD_$(VcodeBUD)=Peek('AXE2',$(i)-1,'PARAMBUD');
let Vaxe3BUD_$(VcodeBUD)=Peek('AXE3',$(i)-1,'PARAMBUD');
Please note that peek() index starts with 0.
With these lines changed, your script runs to the end.
Regards,
Stefan
Hello Stefan !
Thanks a lot for your help. It's ok now !!!
Really thank you.
Regards