Hi team,
my requirement is : I called my record type into a interface to show in grid format, want to show all the images i have uploaded for all the respective id's of grid and i tried using expression rule and but facing problem in passing the id of the record into the expression rule, please help me with this.
a!localVariables( local!selectedInterface, local!ammenities:'type!{urn:com:appian:types:SHA}SHA_newAmmenities'(), local!list:'type!{urn:com:appian:types:SHA}SHA_listType'(), local!Document:'type!{urn:com:appian:types:SHA}SHA_document'(), local!docImage:rule!SHA_qe_getDocuments( entityId:ri!listing.listingId ), /*local!data: a!recordData(*/ /*recordType: 'recordType!{f5a15e34-42fe-43a9-b8c0-e51ffd299618}Student list type',*/ /*filters: a!queryLogicalExpression(*/ /*operator: "AND",*/ /*filters: {*/ /*a!queryFilter(*/ /*field:'recordType!{f5a15e34-42fe-43a9-b8c0-e51ffd299618}Student list type.fields.{listingId}listingId',*/ /*operator: "=",*/ /*value: fv!row*/ /*)*/ /*},*/ /*ignoreFiltersWithEmptyValues: true*/ /*)*/ /*), */ { a!imageField( images: a!documentImage( document:local!docImage )), a!sectionLayout(), if( rule!APN_isBlank(local!selectedInterface), {}, choose( local!selectedInterface, rule!SHA_listing( listing:ri!listing, ammenities:ri!ammenities, documents: ri!Document, ), ) ), a!sectionLayout( contents:a!columnsLayout( columns:{ a!columnLayout( contents:a!richTextDisplayField( value:a!richTextItem( text: "Overview",size:"MEDIUM_PLUS",style: "STRONG"), align: "LEFT" ), width: if( a!isPageWidth("DESKTOP_WIDE"), "MEDIUM_PLUS", "MEDIUM" ) ), a!columnLayout(), a!columnLayout(), a!columnLayout(), a!columnLayout( contents: { a!cardLayout( contents:a!richTextDisplayField( labelPosition: "COLLAPSED", value:{ a!richTextItem( text:"ADD PROPERTY",size:"MEDIUM",color:"ACCENT",style: "STRONG") }, align: "CENTER" ), link: a!startProcessLink( processModel: cons!SHA_HOME_PM ) ) } ), }, showWhen: rule!APN_isBlank(local!selectedInterface) = true(), marginBelow:"NONE", spacing: "DENSE" ), divider: "BELOW" ), a!sectionLayout( label: "Filter By", contents: { }, showWhen: rule!APN_isBlank(local!selectedInterface) = true(), divider:"ABOVE" ), a!sectionLayout( label:"", contents:rule!SHA_homeRequest( refresh: ri!refresh, Listing: ri!listing, Ammenities: ri!ammenities, Document: ri!Document, Pets: ri!Pets ) /*showWhen:rule!APN_isBlank(local!selectedInterface) = true()*/ ) } )
when I passed the rule input inot the expression rule i got this but it is not working for all the id's
Discussion posts and replies are publicly visible
When your local!docImage contains a list of documents, try to use a forEach() to create a list of a!documentImage().
I tried that also Stefan, my problem is whatever the fields(property id's) are showing on the grid need to pass into the expression rule to get the respective documents. eg: In my grid, I am showing 4 rows for each row there are respective documents, i need to pass that id into the expression rule get documents
Can you explain what exactly you want to achieve? I think I am missing something.
The grid is just showing data passing in one of the rule inputs. The data contains documents. Correct? If yes, I do not understand the issue.
Are you saying that the documents at the top should be all documents for items that are displayed on the grid? If so, it isn't possible to pass the IDs from the grid to another place in your interface, so you should just query them again to find their documents.
thank you Stefan i got it by using this