a!gridField(
data:index(local!datasubset,"data",{}),
columns:{
a!gridColumn(
value:apply(concat(_,"-",_),merge(index(fv!row,"id",{}),index(fv!row,"exhibit_id",{}))
)
}
Error comes:----
at merge() function only list are allowed
.how i change fv!row to list
Discussion posts and replies are publicly visible
It seems like there is only a single value in fv!row.id. Is there a specific reason why you use merge()?
why do you use apply() and not a!forEach? apply is simply outdated, but i think this looping is not needed in total.the input for data: parameter -> this lists are the rows you are iterating throughmerge() is for combining lists in a specific way. in a grid, which already walk through the array of data at the data parameter, you dont need looping usually on top of it.its kind of way over engineered . fv!row is like "fv!Item" of an "a!forEach" it represent one value of the looped array.make it easy:
a!gridColumn( value:concat(index(fv!row,"id",{}),"-",index(fv!row,"exhibit_id",{})) )
thanks error is resolved
Additionally, the "fv!row" structure is set up in such a way that it's automatically protected against accessing nonexistent properties via dot property, so we don't even need index() (or really, property(), grumble) here at all.
value: fv!row.id & "-" & fv!row.exhibit_id,
thanks sir