Skip to main content
July 20, 2023
Question

grid error

  • July 20, 2023
  • 5 replies
  • 0 views

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  

    5 replies

    stefanhelzle0001
    Brainy
    July 20, 2023

    It seems like there is only a single value in fv!row.id. Is there a specific reason why you use merge()?

    richardm900458
    July 20, 2023


    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 through
    merge() 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",{}))
    
    )

    July 20, 2023

    thanks error is resolved