Expression evaluation error: Syntax error.

Receiving the following error on the Interface I am working on.:

"Expression evaluation error: Syntax error. Details: Expression evaluation error at function a!columnsLayout parameter 1 [line 285]: Keyword and non-keyword arguments must not be mixed. Used in: columnlayout."

Code mentioned is as follows:

  Discussion posts and replies are publicly visible

Parents
  • The error is pretty clear. If you are not able to identify it, please paste the code block instead of a screenshot. 

  • Obviously if it was clear to me and I could identify it I wouldn't have posted the question on here. I posted in "New to Appian" because I am just that, as is the rest of my team, trying to migrate an app from another low code platform that I don't know. You could have just said, "Hey, I think I can help, can you please post the code block instead of a screenshot?" instead of being all condescending about it.

  • 0
    Certified Lead Developer
    in reply to cls5469

    Hey, I'm sure the intention was not wrong there, the error messages in Appian are very meaningful and straight forward and it is easy to identify the issue by just reading them. I understand that you are a Newbie and can have a hard time figuring out what is going on sometimes but sometimes it is hard to notice that question is posted in "New to Appian" category and I'm sure this was the case here as well.

    I can easily reproduce this error when I try to provide a value to a parameter in columnLayout() without its keyword. Try to understand it this way, if you have provided a keyword to any of the parameter in a component then it is must that you have to provide the same for each parameter, o/w it will result in this error.

    Please see these different examples for more clear understanding and don't hesitate to share the code if you are not able to solve it.

        

  • I understand the concept of the keyword in regard to the examples, but I do not see where a keyword is missing in my code. Here is the actual code block starting with line 285..

    a!columnLayout(
                          contents: {
                            a!textField(
                              label: "PVQ:",
                              labelPosition: "ABOVE",
                              value: a!defaultValue(
                                ri!record['recordType!{c71d4310-6b52-422b-a34b-0486f97cfe6a}PSLM Claims.fields.{dd84820e-1e70-4ea2-9a66-6ea1d9aead27}claimpVQ'],
                                "–"
                              ),
                              readOnly: true
                            ),
                            a!textField(
                              label: "Final Settlement:",
                              labelPosition: "ABOVE",
                              value: if(
                                isnull(
                                  ri!record['recordType!{c71d4310-6b52-422b-a34b-0486f97cfe6a}PSLM Claims.fields.{a435211c-97aa-4ca0-b329-7a300067e403}claimFinalSettlement']
                                ),
                                "–",
                                text(
                                  ri!record['recordType!{c71d4310-6b52-422b-a34b-0486f97cfe6a}PSLM Claims.fields.{a435211c-97aa-4ca0-b329-7a300067e403}claimFinalSettlement'],
                                  "#.##"
                                )
                              ),
                              readOnly: true
                            ),
                            a!textField(
                              label: "Demand:",
                              labelPosition: "ABOVE",
                              value: if(
                                isnull(
                                  ri!record['recordType!{c71d4310-6b52-422b-a34b-0486f97cfe6a}PSLM Claims.fields.{ac78072a-81fe-492e-bfc4-18240c29dbb4}claimDemand']
                                ),
                                "–",
                                text(
                                  ri!record['recordType!{c71d4310-6b52-422b-a34b-0486f97cfe6a}PSLM Claims.fields.{ac78072a-81fe-492e-bfc4-18240c29dbb4}claimDemand'],
                                  "#.##"
                                )
                              ),
                              readOnly: true
                            ),
                            a!textField(
                              label: "KBB Value:",
                              labelPosition: "ABOVE",
                              value: if(
                                isnull(
                                  ri!record['recordType!{c71d4310-6b52-422b-a34b-0486f97cfe6a}PSLM Claims.fields.{4fd8f62e-eccd-4741-81a0-775720ff3bcd}claimKBBValue']
                                ),
                                "–",
                                text(
                                  ri!record['recordType!{c71d4310-6b52-422b-a34b-0486f97cfe6a}PSLM Claims.fields.{4fd8f62e-eccd-4741-81a0-775720ff3bcd}claimKBBValue'],
                                  "#.##"
                                )
                              ),
                              readOnly: true
                            ),

  • 0
    Certified Lead Developer
    in reply to cls5469

    You need to share the whole a!columnLayout() code...from opening to closing, make sure that you have provided keyword for "width" and "showWhen" parameters if you are using them.

  • 0
    Certified Lead Developer
    in reply to cls5469

    I just took the code snippet above and put it inside a columnsLayout and it is working fine. Likely the problem is happening just above.

    a!columnsLayout(
      columns: {
        a!columnLayout(
          contents: {
            a!textField(
              label: "PVQ:",
              labelPosition: "ABOVE",
              value: a!defaultValue("", "–"),
              readOnly: true
            ),
            a!textField(
              label: "Final Settlement:",
              labelPosition: "ABOVE",
              value: if(isnull("", ), "–", text("", "#.##")),
              readOnly: true
            ),
            a!textField(
              label: "Demand:",
              labelPosition: "ABOVE",
              value: if(isnull("", ), "–", text("", "#.##")),
              readOnly: true
            ),
            a!textField(
              label: "KBB Value:",
              labelPosition: "ABOVE",
              value: if(isnull("", ), "–", text("", "#.##")),
              readOnly: true
            ),
            
          }
        )
      }
    )

  • 0
    Certified Lead Developer
    in reply to cls5469

    You too could have just pasted the code instead of all this text as well :) 

Reply Children
No Data