
Contributor
2023-07-11
05:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to use a "for each" loop to insert data into a table instead of typing it by hand?
Hi everyone,
I have a problem with using a "for each" loop. I would like to insert the list values from an already existing list.
Example:
for each stock1 in 'A', 'B', 'C';
trace $(stock1);
next;
If I generate a table:
stock:
load * inline [stock1
A
B
C];
I can't use the field stock1 in the "for each" loop.
Thanks!
558 Views
1 Solution
Accepted Solutions

Contributor
2023-07-11
06:03 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I solved it by myself, I had to use the FieldValueList() statement, in this way:
stock:
load * inline [stock1
A
B
C];
for each stock1 in FieldValueList ('stock1');
trace $(stock1);
next;
Thank you all the same
1 Reply

Contributor
2023-07-11
06:03 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I solved it by myself, I had to use the FieldValueList() statement, in this way:
stock:
load * inline [stock1
A
B
C];
for each stock1 in FieldValueList ('stock1');
trace $(stock1);
next;
Thank you all the same
