Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Please Help : I am going to be crazy whith my Script !

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

Labels (1)
2 Replies
swuehl
Champion III
Champion III

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

Not applicable
Author

Hello Stefan !

Thanks a lot for your help. It's ok now !!!

Really thank you.

Regards