Skip to main content
Known Participant
Nov 25, 2023 3:29 PM UTC
Question

Could not display interface. Please check definition and inputs.

Hii, 

I am getting this error while executing saveinto

Could not display interface. Please check definition and inputs.

Interface Definition: Expression evaluation error at function a!forEach [line 139]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function a!paragraphField [line 153]: Invalid index type: Record field uuid: 2a1bfc02-84a2-4226-8519-1a87a180881c Record type uuid: b5dd0e17-b6cf-431f-a6b1-27d0db4b17da Relationship path: [407e0837-118e-4386-9d0f-db23d7df12ba]

  rows: a!forEach(
            items: local!section1,
            expression: a!gridRowLayout(
              id: fv!index,
              contents: {
                a!textField(value: fv!item, readOnly: true()),
                a!radioButtonField(
                  label: "",
                  choiceLabels: { "Yes", "No" },
                  choiceValues: { 1, 0 },
                  /*value: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{899275d5-d9e3-4030-9291-883eaf45d2c6}reviewerAnswerBool'],*/
                  /*saveInto: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{899275d5-d9e3-4030-9291-883eaf45d2c6}reviewerAnswerBool'],*/
                  choiceLayout: "COMPACT"
                ),
                a!paragraphField(
                  value: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{2a1bfc02-84a2-4226-8519-1a87a180881c}reviewerComment'],
                  saveInto: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{2a1bfc02-84a2-4226-8519-1a87a180881c}reviewerComment'],
                  characterLimit: 500

3 replies

stefanhelzle0001
Brainy
Nov 25, 2023 4:45 PM UTC

Not much detail here. Could it be that you try to access data that you did not include in the query?

Known Participant
Nov 25, 2023 5:11 PM UTC

a!localVariables(
  local!application: rule!GAI_getApplication(applicationId: ri!appId).data,
  local!refAppReviewQnts: rule!GAI_GetRefAppReviewQuestions(
    fiscalYear: local!application['recordType!{5f640b2a-afca-4569-92d3-9e2938c52816}GAI Application.relationships.{abdf1474-5557-4307-87ca-cebf6144aab0}gaiOpportunity.fields.{8140c1d1-fe02-45b1-b6bc-53f76502fad9}fiscalYear'],

  ).data,
  local!sectionNm: local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName'],
  local!uniqueSectionNm: union(local!sectionNm, local!sectionNm),
  local!section1: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[1],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section2: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[2],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section3: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[3],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section4: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[4],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section5: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[5],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section6: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[6],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section7: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[7],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section8: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[8],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!section9: index(
    local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{50e521dd-a911-44c7-bf1e-ab883e70ddf7}question'],
    wherecontains(
      local!uniqueSectionNm[9],
      touniformstring(
        local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{e1b99615-c22f-4b3e-9c45-dd9c86966031}sectionName']
      )
    ),
    {}
  ),
  local!allreviewScore: local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{94f05f4b-795b-49aa-8ab1-5e7095e2841e}maxScore'],
  local!ReviewScore: union(
    local!allreviewScore,
    local!allreviewScore
  ),
  local!appReview: if(
    a!isNotNullOrEmpty(local!refAppReviewQnts),
    a!forEach(
      items: local!section1,
      expression: 'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review'(
        'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{1b300782-cfa5-46fd-8939-303b6d6b98e8}fkAppReviewQuestionId': local!refAppReviewQnts['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.fields.{bd3598b0-c259-400f-a433-14a07c64e1a6}appReviewQuestionId'],
        'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{dd93e08a-39c8-4cde-8b05-940968017a52}fkAppId': ri!appId,
        'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{89e3c450-a549-4d71-97ef-cbdb5cee1676}isActive': null,
        'recordType!{5cd86211-4e9e-42a1-ad5d-b6b72ee2fac6}GAI Award Funding Allocation.fields.{16fa8791-cd51-4c1a-98ba-bcc88ff66cb3}fundAmt': null,
        'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{23368363-7840-4367-a452-ae513fd1ba7b}createUsr': loggedInUser(),
        'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{c9d44643-f49b-4c1e-8368-8e0e49726d9a}createTs': now(),
        'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{e30c73f1-e271-44da-bac7-8f0b520f6942}updateUsr': loggedInUser(),
        'recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{4b76bc69-8bc5-4a93-b53f-01181e975b62}updateTs': now()
      )
    ),
    null()
  ),
  {
    rule!SCO_SectionLayout(
      label: local!uniqueSectionNm[1],
      contents: {
        a!gridLayout(
          headerCells: {
            a!gridLayoutHeaderCell(label: "Question"),
            a!gridLayoutHeaderCell(label: "Review Answer"),
            a!gridLayoutHeaderCell(label: "Reviewer Comments"),
            a!gridLayoutHeaderCell(label: "Review Score")
          },
          columnConfigs: {
            a!gridLayoutColumnConfig(width: "WIDE"),
            a!gridLayoutColumnConfig(width: "NARROW_PLUS"),
            a!gridLayoutColumnConfig(width: "WIDE"),
            a!gridLayoutColumnConfig(width: "NARROW_PLUS"),

          },
          rows: a!forEach(
            items: local!section1,
            expression: a!gridRowLayout(
              id: fv!index,
              contents: {
                a!textField(value: fv!item, readOnly: true()),
                a!radioButtonField(
                  label: "",
                  choiceLabels: { "Yes", "No" },
                  choiceValues: { 1, 0 },
                  /*value: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{899275d5-d9e3-4030-9291-883eaf45d2c6}reviewerAnswerBool'],*/
                  /*saveInto: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{899275d5-d9e3-4030-9291-883eaf45d2c6}reviewerAnswerBool'],*/
                  choiceLayout: "COMPACT"
                ),
                a!paragraphField(
                  /*value: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{2a1bfc02-84a2-4226-8519-1a87a180881c}reviewerComment'],*/
                  /*saveInto: fv!item['recordType!{b5dd0e17-b6cf-431f-a6b1-27d0db4b17da}GAI Ref App Review Questions.relationships.{407e0837-118e-4386-9d0f-db23d7df12ba}gaiAppReview.fields.{2a1bfc02-84a2-4226-8519-1a87a180881c}reviewerComment'],*/
                  characterLimit: 500
                ),
                a!dropdownField(
                  label: "Review Score",
                  placeholder: "--- Select the review score ---",
                  choiceLabels: local!ReviewScore,
                  choiceValues: local!ReviewScore
                ),

              }
            )
          ),

This is my code

stefanhelzle0001
Brainy
Nov 25, 2023 8:38 PM UTC

You need to check that your local!section1 actually contains the data you need. So, does this exist?

'recordType!GAI Ref App Review Questions.gaiAppReview.fields.reviewerComment'

Have a look at your local variables and check for this.