Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am working on a dashboard to load values in between Start and End (specifically postal codes). I am doing testing now, but I can't get it to work. I know it must be a combination of the loop and concatenated loading but I just can't figure it out. See my sample code below. I would want my output to be essentially. Thanks!
Postal Code
10
11
12
13
14
15
16
17
18
19
20
Range:
LOAD * INLINE [
Start, End
10, 20
];
let x = FieldValue('Start',1);
let y = FieldValue('End',1);
for i=$(x) to $(y)
Postal_Codes:
load *,
i as Postal_Code
Resident Range;
next i;
drop table Range;
You need to evaluate your variable in the LOAD like
...
$(i) as Postal_Code
...
Another way to create your sequence would be
Range:
LOAD * INLINE [
Start, End
10, 20
];
let x = FieldValue('Start',1);
let y = FieldValue('End',1);
Postal_Codes:
LOAD $(x)+recno()-1 as Postal_Code
autogenerate $(y)-$(x)+1;
drop table Range;