Hello Everyone,
I have to show the UI like this(read-only), first two columns' data comes from different table (like collateral_cdt) and 3rd and 4th columns data comes from (cust_doc_cdt).How can I display this Ui?
Please suggest on priority
Discussion posts and replies are publicly visible
Use the below code to display download icon, using wherecontains pass the document Id inside document.
a!gridColumn( label: "conventional", value: a!richTextDisplayField( value: a!richTextIcon( icon: "download", linkStyle: "STANDALONE", link: a!documentDownloadLink( document: 1 ) ) ) ),
a!localVariables( local!crAppCollateral_cdt: rule!CR_APP_QE_getAppCollateralForDocGeneration( cif_int: ri!cif_int, collateralFlag_int: 0, requestId_int: ri!requestId_int ), local!crCustDoc_cdt: rule!CR_CUST_QE_getCustomerDocDataBasedOnFilters( cif_int: ri!cif_int, requestId_int: ri!requestId_int, sourceRowId_int: index(local!crAppCollateral_cdt, "id_int", "") ), local!download: index( local!crAppCollateral_cdt, wherecontains( index(local!crAppCollateral_cdt, "id_int", ""), index( local!crCustDoc_cdt, "sourceRowId_int", "" ) ) ), local!docid: a!forEach( items: local!crAppCollateral_cdt, expression: index( local!crCustDoc_cdt, wherecontains(tointeger(index(fv!item,"id_int","")),tointeger(index(local!crCustDoc_cdt,"sourceRowId_int",{}))), "docId_int", "" ), ), a!gridField( labelPosition: "ABOVE", data: local!crAppCollateral_cdt, columns: { a!gridColumn( label: "Collateral Type", value: index(fv!row, "collateralDescription_txt") ), a!gridColumn( label: "Collateral Type Detail", value: index(fv!row, "collateralTypeDescription_txt") ), a!gridColumn( label: "conventional", value: a!linkField( label: if( isnull(index(fv!row, "docId_int", {})), "", document( documentId: tointeger( index( local!crCustDoc_cdt, wherecontains( index(fv!row, "id_int", ""), tointeger( index( local!crCustDoc_cdt, "sourceRowId_int", "" ) ) ), "docId_int", "" ), ), property: "name" ) ), links: a!documentDownloadLink( label: if( isnull(index(fv!row, "docId_int", {})), "", document( documentId: index(fv!row, "docId_int", {}), property: "name" ) ), document: index(fv!row, "docId_int", {}) ) ) ), } ) )
I am following this way to get lists of document from the crcustDoc_cdt and trying to map with crCollateral_cdt. But getting some errors. Could you please help me on this
"getting some errors" is not exactly helpful to understand what is going on!