Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I use a loop together with a variable VarRow. The table conains 5 rows and VarRow =5. But When I run below script (part of) the loops just keeps on going.
Any tips?
Rownr:
Load Max(Rows) as MaxRow
Resident Tmp_Agreements1;
Set VarRow = MaxRow;
For I =0 to VarRow
Tmp_BridgeTable:
Load
distinct Productgroep as Bonus_Productgroep ,
Peek('Agree_End_Date',$(I),'Tmp_Agreements1') as Agree_End_Date ,
Peek('Agree_Start_Date',$(I),'Tmp_Agreements1') as Agree_Start_Date ,
Peek('Bonus_Hoofdorganisatie',$(I),'Tmp_Agreements1')as Bonus_Hoofdorganisatie,
Peek('Bonus_Abs',$(I),'Tmp_Agreements1')as Bonus_Abs,
Peek('Bonus_%',$(I),'Tmp_Agreements1')as Bonus_%,
Peek('Bonus_Base',$(I),'Tmp_Agreements1') as Bonus_Base,
Peek('Bonus_Artnr',$(I),'Tmp_Agreements1') as Bonus_Artnr,
Peek('Agreement_Description',$(I),'Tmp_Agreements1')as Agreement_Description,
Peek('Overeenkomst',$(I),'Tmp_Agreements1')as Overeenkomst
Resident Sales_Lines ;
Next I
Set VarRow = Peek('MaxRow',0,'Rownr');
Drop Table Rownr;
For I =0 to '$(VarRow)'-1
Set VarRow = Peek('MaxRow',0,'Rownr');
Drop Table Rownr;
For I =0 to '$(VarRow)'-1
Thanks, but i get an error
But with Let instead of Set it works
Use Single Quotes...
May be
Let VarRow = Num(Peek('MaxRow',0,'Rownr'));