Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need create fields dynamically using 'for'.
Obs.: Always have Subject 1
I try:
Table:
LOAD * INLINE [
Category, Category_desc
1234, English
1234, Maths
1234, French
2345, French
2334, English
];
Table1:
Load
Category as ID,
Category_desc as Subject1
Resident Table
Where Not Category = Previous(Category)
Order By Category, Category_desc;
let vRow = NoOfRows(ID);
for i = 2 to '$(vRow)'
Left Join (Table1)
LOAD
Category as ID,
Category_desc as 'Subject$(i)'
Resident Table
WHERE Category = Previous(Category)
Order By Category, Category_desc;
Next
Drop Table Table;
But, something's wrong, any help?
It should not be NoOfRows(ID). NoOfRows function takes Table name not the Field name so try like
let vRow = NoOfRows('Table1');
It should not be NoOfRows(ID). NoOfRows function takes Table name not the Field name so try like
let vRow = NoOfRows('Table1');
Ohhhh simple mistake
Thank You!
NO problem.