So, Ive tried creating a gridfield with a gridtextColumn that has a link
a!gridTextColumn( label: "Scanned Documents", data: { a!forEach( items: index(local!attachments, "id", {}), expression: { "Document #" & fv!item } ) },
links: {
a!forEach( items: index(local!attachments, "id", {}), expression: { a!safeLink( uri: cons!BASE_URL & fv!Item ) } )
} )
So basically I have a list of attachments that has a link in an external website.
BASE_URL = https://somedomain/view/doc?id={fv!item}
The resulting uri is : https://somedomain/view/doc?id=123456
However, I am getting this error:
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 53]: A grid component [label=“”] has an invalid value for “columns”. A text column [label=“Scanned Documents”] has an invalid value for “links”. “links” can only be of type DynamicLink, ProcessTaskLink, RecordLink, ReportLink, SafeLink or StartProcessLink. Received SafeLink?list at index 1.
I am not sure what the problem is. Has anyone encoutered this?
Discussion posts and replies are publicly visible
The error message indicates that it is receiving a list of safe links where it is expecting a single safe link. a!forEach returns an array, but you're also wrapping both the forEach and the expression it is iterating over in array brackets, creating a multi-dimensional array. So, when the grid looks at the first element of "links", it gets a list of links. Try getting rid of both of those sets of array brackets I mentioned, and I think that will solve your problem.