

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
concatenate all fields from a table into an Variable
Hi
I want a variable to contain a comma separeted list of all fields from a specific table, or from all possible tables.
I would prefere a solution in the load script or an expression, but not a macro solution.
Is it possible?
(A bonus task would be to be able to exclude some fields in the variable.)
I guess the best solution would be a For Each - solution, but Im not finding the way to loop fieldnames in a table.
Best Regards
Robert


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robert,
this example list all fields from last load.
let vLoadTable = TableName(NoOfTables() - 1); // Name der zuletzt geladenen Tabelle wird ausgelesen
let vLoadFieldCount = NoOfFields('$(vLoadTable)'); // Anzahl der Tabellenfelder wird ausgelesen
let vLoadFields = ''; // Variablen-Inhalt löschen
for i = 1 to $(vLoadFieldCount)
let vLoadFields = '$(vLoadFields)' & FieldName($(i), '$(vLoadTable)') & ', '; // Felder der Tabelle werden String verkettet
next
- Marcus
