I am getting the above error , what does it mean and how to fix it?
I am trying to add the document in the grid , and save to its record type.
The rule input Doc is defined as (array) could this be where the problem is?
a!sectionLayout( label: "Documentation Details ", labelIcon: "file-text", labelSize: "SMALL", labelColor: "STANDARD", contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!gridLayout( totalCount: count(ri!Doc), headerCells: { a!gridLayoutHeaderCell(label: "Document" ), a!gridLayoutHeaderCell(label: "Name" ), a!gridLayoutHeaderCell(label: "Classification" ), a!gridLayoutHeaderCell(label: "Uploaded By" ), a!gridLayoutHeaderCell(label: "Uploaded On" ) }, columnConfigs: { a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:2 ) }, rows: a!forEach( items: ri!Doc, /*localdata*/ expression: a!gridRowLayout( id: fv!index, contents: { a!fileUploadField( target: cons!SKJ_DOCUMENTS_FOLDER, maxSelections: 1, value: /*local!doc,*/ fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId'], saveInto: {/*local!doc*/ fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId'], a!save(fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{66325d17-158b-4776-98b3-761a5a458e5c}addedBy'],loggedInUser()), a!save(fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{601d2c71-2a27-48c0-939b-61ff68722c5a}requestId'],1), a!save(fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{1fc16e35-b769-46b0-8d9e-9dc633cbb090}addedOn'],today()), a!save(fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{f65ae4e8-afd3-4a5a-80c7-3c67d225a274}docName'],extract(fn!getcontentobjectdetailsbyid(fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6c686146-7506-45c1-b2e6-1db2e0eb6900}appianDocId']), "Name:", ".")) /* a!save(fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{6d510991-df65-4ae0-a9b9-179a36931fb0}docId'],document(documentId: local!doc, property: "id"))*/ }, buttonDisplay:"ICON",buttonStyle: "STANDARD"), a!textField( value:/* if(a!isNullOrEmpty(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:", "."),""),*/ saveInto: 'recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{f65ae4e8-afd3-4a5a-80c7-3c67d225a274}docName' ), /* For the Department Column*/ a!dropdownField( label: "department " & fv!index, placeholder: "-- Select -- ", choiceLabels: { "First", "Sec"}, choiceValues: { 1, 2 }, value: fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{a3f411dd-394e-4039-a2d0-600d333f94b0}classification'], saveInto:fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{a3f411dd-394e-4039-a2d0-600d333f94b0}classification'], required:false ), a!textField( value:local!addedBy ,/*fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{f65ae4e8-afd3-4a5a-80c7-3c67d225a274}docName'],*/ saveInto:fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{66325d17-158b-4776-98b3-761a5a458e5c}addedBy'], required:true ), a!textField( value: today(), saveInto: fv!item['recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document.fields.{1fc16e35-b769-46b0-8d9e-9dc633cbb090}addedOn'], required:true ) } ) ), showWhen: not(isnull(index(local!selectedEmployees,1,"null").accountId)), addRowlink: a!dynamicLink( label: "Add Document", value: append(ri!Doc,'recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document'()) , /*startDate: today() + 1},*/ saveInto: { a!save( ri!Doc, append(ri!doc, 'recordType!{52d6bfd4-9a4e-457c-ab2e-ede6cffdb054}SKJ Document') ) } /* saveInto: { a!save(local!document, append(local!document, save!value)) }*/ ), rowHeader: 1 ) } ) } ) }, showWhen: not(isnull(index(local!selectedEmployees,1,"null").accountId)) )
Please look at my code and help me
Discussion posts and replies are publicly visible
What's the type of pv!Doc (that is, the variable configured in the Process Model)? Is it the same type AND also set to "multiple"?
The value should be "Doc" this is how I defined the rule input in the code (as in image 3) ,
I think it say "Multiple" because i set the rule input as Array ,
but when i don't set it as array the code results an error
The type of Doc is a record type "Document "
Shayne Rt said:The value should be "Doc" this is how I defined the rule input in the code
I'm not talking about the rule input in the interface, i'm talking abou tthe PV value configured in the process model (which is why i said ... that same thing ... above). Generally speaking, you will need to make sure the PV value matches the type configuration of the Rule Input.
The error message you're getting still suggests that these configurations don't match correctly: