I am using square brackets but this error shows .
what is wrong with my code?
a!boxLayout( label: "Box", contents: { a!gridLayout( label: "Document", headerCells: { a!gridLayoutHeaderCell(label: "Document", align: "CENTER"), a!gridLayoutHeaderCell(label: "Name", align: "CENTER"), a!gridLayoutHeaderCell(label: "Classification", align: "CENTER"), a!gridLayoutHeaderCell(label: "Upload By", align: "CENTER"), a!gridLayoutHeaderCell(label: "Upload On", align: "CENTER") }, columnConfigs: { a!gridLayoutColumnConfig(), a!gridLayoutColumnConfig(), a!gridLayoutColumnConfig(), a!gridLayoutColumnConfig(), a!gridLayoutColumnConfig() }, rows: a!forEach( items: if( a!isNotNullOrEmpty( ri!record['recordType!{2206daff-ddbb-4759-a797-1588754c3925}SKJ Deposit Request.fields.{0cfaa083-3ffb-447a-b682-c5c16c88cd67}requestId'] ), rule!SKJ_GetDoc( REQId:ri!record['recordType!{2206daff-ddbb-4759-a797-1588754c3925}SKJ Deposit Request.fields.{0cfaa083-3ffb-447a-b682-c5c16c88cd67}requestId'] ).data, null ), expression: a!gridRowLayout( contents: { a!richTextDisplayField( value: a!richTextItem( text: { a!richTextIcon(icon: "download", color: "#0f203a"), " ", if( a!isNotNullOrEmpty( fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId'] ), ( extract( fn!getcontentobjectdetailsbyid( fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId'] ), "Name:", "," ) ), null ) }, link: a!documentDownloadLink( document: fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId'] ), linkStyle: "STANDALONE", color: "#0f203a" ), align: "CENTER" ), a!textField( value: if( a!isNotNullOrEmpty( fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId'] ), ( extract( fn!getcontentobjectdetailsbyid( fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId'] ), "Name:", "," ) ), null ), readOnly: true, align: "CENTER" ), a!textField( value: fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{a3f411dd-394e-4039-a2d0-600d333f94b0}classification'], readOnly: true, align: "CENTER" ), a!textField( value: fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{66325d17-158b-4776-98b3-761a5a458e5c}addedBy'], readOnly: true, align: "CENTER" ), a!richTextDisplayField( label: "Uploaded On", labelPosition: "JUSTIFIED", value: fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{66325d17-158b-4776-98b3-761a5a458e5c}addedBy'] ) } ) ), selectionSaveInto: {}, validations: {}, shadeAlternateRows: true, borderStyle: "LIGHT" ) }, style: "STANDARD", marginBelow: "STANDARD" )
Discussion posts and replies are publicly visible
What does that expression "SKJ_GetDoc" return? Is the ".data" correct?
Hm ... I do not see any obvious issues. I suggest to simplify that code to find the error.
One thing: Please do NOT use "getcontentobjectdetailsbyid" to get the name of a file. The OOTB document() function will do that perfectly.
ok i found out that RequestId is not being saved for the doc. it saves "Null."
The RequestID is auto generated , how can i save it ?
The interface i am working with is "Create Request" so will the id be generated before i click "create"?
"Auto Generated" means, that the value for the field will be created as the data is stored to the database. The "Write Records" smart service allows you to write nested records in one go.
https://docs.appian.com/suite/help/23.3/Write_Records_Smart_Service.html#create-records-and-related-records-using-a-process-model
But that seems to be a different issue.