Grid Plus Configuration error

Certified Associate Developer

I have configured the plug-in but every time I try to submit changes I get the following error: Incorrect configuration: Please set up the ‘submitChangesValue’ and ‘submitChangesSaveInto’ parameters. Kindly refer to the documentation for configuration details. I assumed that the problem was due to the rule configuration entered in the ‘colConfigRuleName’ parameter. Does anyone know how to configure the parameter?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Looks like the issue is with 'queryRuleName' and 'colConfigRuleName' configuration in your code. Those should have rule! prefix. Please refer below for syntax reference. 

     gridsubmitchanges(
            queryRuleName: rule!RE_queryRule,
            colConfigRuleName: rule!RE_columnConfig,
            createData: local!creates,
            editData: local!edits,
            deleteData: local!deletions,
            createModel: cons!RE_CREATE_OR_UPDATE,
            editModel: cons!RE_CREATE_OR_UPDATE,
            deleteModel: cons!RE_DELETE
          )
  • 0
    Certified Associate Developer
    in reply to Harsha Sharma

    i see the configuration in other thread. Nevermind i change but now the result it's this (i'l do the creation, the other action if you see it's disabled).

  • 0
    Certified Lead Developer
    in reply to marcom0706

    Great! So your earlier issue is resolved. Would be good if you verify the above answer.

    as for this error- The error says some issues lies within a foreach expression where you have a!fromjson(). So can you check the related code block or share here so that we can get some insights and help

  • 0
    Certified Associate Developer
    in reply to Harsha Sharma

    This error it's not related to the code that i wrote. After the click on the submit changes in the local!variable "local!submitChanges" i have the error (it's return from the plug-in code).

    "{""errorOccurred"":""Expression evaluation error at function a!forEach [line 5]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function a!fromJson [line 8]: The jsonText parameter was not valid JSON.""}"

  • 0
    Certified Lead Developer
    in reply to marcom0706

    okay so lets check few things:

    1. Is the processModel mentioned against createModel, has activity chaining enabled across all nodes?

    2. Does the processModel has process variable named 'record' in it and has 'Multiple' set to true()?

    3. Is the 'colConfigRuleName' mentioned in gridsubmitchanges() same as the columnConfigs in gridpluslayoutField()? 

  • 0
    Certified Lead Developer
    in reply to marcom0706

    Also As you have disabled edit and delete, you can remove the related attributes from the gridSubmitChanges code. Earlier code I shared was for reference to show the syntax of queryRuleName and colConfigRuleName. 

  • 0
    Certified Associate Developer
    in reply to Harsha Sharma

    now, i'll do all the raccomandation but now i have another error after the submit:

    "{""errorOccurred"":""class [Lcom.appiancorp.suiteapi.type.TypedValue; cannot be cast to class [Ljava.util.Map; ([Lcom.appiancorp.suiteapi.type.TypedValue; is in unnamed module of loader com.appiancorp.tomcat.loader.AppianWebappClassLoader @2a49fe; [Ljava.util.Map; is in module java.base of loader 'bootstrap')""}"

  • 0
    Certified Associate Developer
    in reply to Harsha Sharma

    I think that the real problem, it's how to configure the rule instead colConfigRuleName (i don't have information abut appian in the documentation). Can you help me?

  • 0
    Certified Lead Developer
    in reply to marcom0706

    In line 13 of your code you have columnConfigs, try to replace the expression there with rule!TNSM_columnConfig() . Also is it possible do share the code if the rule if the above doesn't work and errors out still!

  • 0
    Certified Associate Developer
    in reply to Harsha Sharma

    I have now this situation:

    the rule that i recall it's this:

    But i have the error : 

    Can you help me?

  • 0
    Certified Lead Developer
    in reply to marcom0706

    All the configurations looks good! This component has specific expectation for configuration including no extra commas or not changing the of fields in the gridcolconfig components. For now I can see only two things which are not explicitly mentioned as causing the error but might! 
    firstly in line 14, if you do the need hidden values either remove it or make the curly braces proper there without any spaces. You can try making it null as well to see if it works. Similarly try removing validations as well as you are not using jt.  Secondly in the col configs rule extra commas is there. Get rid of that too and retry

  • 0
    Certified Lead Developer
    in reply to Harsha Sharma

    I'm seeing a similar error after clicking Submit Changes. See code below.

    Also Process model contains a pv called record (multiple + parameter), fully chained

    a!localVariables(
      local!submitChanges:{},
      local!creates: {},
      gridPlusLayoutField(
        enableCreate: true,
        enableEdit: false,
        enableDelete: false,
        queryRuleName: rule!FOS_getPPSBasisGridPlusWithFields,
        queryRuleInputs: null,
        columnConfigs: rule!FOS_PPSColumnConfigGridPlus(),
        createDataValue: local!creates,
        createDataSaveInto: local!creates,
        editDataValue: {},
        editDataSaveInto: {},
        deleteDataValue: {},
        deleteDataSaveInto: {},
        submitChangesValue: local!submitChanges,
        submitChangesSaveInto: a!save(
          target: local!submitChanges,
          value: gridsubmitchanges(
            queryRuleName: rule!FOS_getPPSBasisGridPlusWithFields,
            colConfigRuleName: rule!FOS_PPSColumnConfigGridPlus,
            createData: local!creates,
            editData: null,
            deleteData: null,
            createModel: cons!FOS_write_PPS_BASIS,
            editModel: null,
            deleteModel: null
          )
        )
      )
    )

Reply
  • 0
    Certified Lead Developer
    in reply to Harsha Sharma

    I'm seeing a similar error after clicking Submit Changes. See code below.

    Also Process model contains a pv called record (multiple + parameter), fully chained

    a!localVariables(
      local!submitChanges:{},
      local!creates: {},
      gridPlusLayoutField(
        enableCreate: true,
        enableEdit: false,
        enableDelete: false,
        queryRuleName: rule!FOS_getPPSBasisGridPlusWithFields,
        queryRuleInputs: null,
        columnConfigs: rule!FOS_PPSColumnConfigGridPlus(),
        createDataValue: local!creates,
        createDataSaveInto: local!creates,
        editDataValue: {},
        editDataSaveInto: {},
        deleteDataValue: {},
        deleteDataSaveInto: {},
        submitChangesValue: local!submitChanges,
        submitChangesSaveInto: a!save(
          target: local!submitChanges,
          value: gridsubmitchanges(
            queryRuleName: rule!FOS_getPPSBasisGridPlusWithFields,
            colConfigRuleName: rule!FOS_PPSColumnConfigGridPlus,
            createData: local!creates,
            editData: null,
            deleteData: null,
            createModel: cons!FOS_write_PPS_BASIS,
            editModel: null,
            deleteModel: null
          )
        )
      )
    )

Children