Today's logic problem: I'm looking to dynamically generate an ncolumnta

Today's logic problem: I'm looking to dynamically generate an ncolumntable() for use in HTML documentation. For example, we collect task history in SQL and like to attach this in HTML emails and audit documents - each process may utilize a different set of history information, so I would like to build this table dynamically based on column header and field inputs, but can't seem to get the code working correctly. The idea is something like this:

load(
local!columns: {"Task","Owner"},
local!fields: {"task","owner"},
local!data: {{task: "Approval",owner: "Jim"},{task: "Submit",owner: "Steve"},{task: "Review",owner: "Joe"}},

ncolumntable(
local!columns,
apply(rule!test_getData(data: local!data, field: _),
local!fields
)
)
)

Where rule!test_getData() is defined simply as (data - Any Type, field - text):

index(ri!data,ri!field,null)

Since ncolumntable() is expecting a different array for each column, the...

OriginalPostID-195148

OriginalPostID-195148

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data