0

Problem with update in loop for

Hi,

I'm trying to update a dataset using a "for" loop:

let Atleta := 'Personalizzazione intestazione';
let ModelloAllenamento := Nome;
let startDate := 'Data inzio';
let idx := 0;
for d in (select Settimana where 'Modelli di allenamento'.'Personalizzazione intestazione' = Atleta and 'Modelli di allenamento'.Nome = ModelloAllenamento) order by Settimana do
if idx = 0 then
d.(Data := startDate)
else
d.(Data := d.Data + 7)
end;
let idx := 1;
void <------- WHY NINOX INSERT THIS KEYWORD??
end

but the code exit always before executing entire loop

1 reply

null
    • Sean
    • 4 yrs ago
    • Reported - view

    You have...

     

    let idx := 1;

     

    inside your for-loop and it would declare the same variable repeatedly if it didn't throw an error. I'm not sure what you're trying to do with the variable since you aren't incrementing it, but it should simply be...

     

    idx := 

    not

    let idx :=

Content aside

  • 4 yrs agoLast active
  • 1Replies
  • 1105Views