Value cannot be cast to com.appiancorp.core.data.Variant

Hello,

I have a paragraph field to enter some description about the documents.For each document,the description should be shown and saved based of document id.

I am facing some weird error which i could not debug.

Please help me what the error is about.

No environmental issues.

load(
  local!documentDetails: rule!RCO_QRY_getDocumentsByDocId(
    docIds: {ri!document},
    isIndexIntoData: true,
    pagingInfo:topaginginfo(
      1,1
    )
  ),
  local!displaySaveSuccess: false,
  {
    a!sectionLayout(
      contents: {
        rule!RCO_displayBannerHeadline(
          isBannerHeadlineVisible: local!displaySaveSuccess,
          style: "SUCCESS",
          message: "Document Details Successfully Saved",
          icon: "check"
        ),
              a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!richTextDisplayField(
                  value: {
                    a!richTextItem(
                      text: "Document Details: "& ri!document,
                      color: "STANDARD",
                      size: "MEDIUM",
                      style: {
                        "STRONG"
                      }
                    )
                  }
                ),
               a!paragraphField(
                  instructions: len(
                    index(
                      local!documentDetails,
                      "documentDetails",
                      {}
                    )
                  ) & "1/150",
                  value: index(local!documentDetails,"documentDetails",null),
                  saveInto:{a!save(local!documentDetails.documentDetails, save!value)},
                  validations: if(
                    len(
                      index(
                        local!documentDetails,
                        "documentDetails",
                        0
                      )
                    ) > 150,
                    "Case Details must be no longer than 150 characters",
                    {}
                  )
                ),
              },
              width: "AUTO"
            )
          },
          alignVertical: "BOTTOM"
        ),
        a!buttonLayout(
          primaryButtons: a!buttonWidget(
            label: "SAVE DOCUMENT DETAILS",
             saveInto: {
              a!writeToDataStoreEntity(
                dataStoreEntity: cons!RCO_DSE_DOCUMENTS,
                valueToStore: local!documentDetails,
                onSuccess: {
                  a!save(
                    local!documentDetails,
                    fv!storedValues
                  ),
                  a!save(
                    local!displaySaveSuccess,
                    true
                  )
                }
              )
             
            }
          )
        )
      }
      /*showWhen: not(rule!APN_isEmpty(local!documentDetails))*/
    )
  }
)

Thanks

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data