Trying to understand local/scoping of variables

Hi:

I was experimenting with the Grid example in Appian Tutorials (https://docs.appian.com/suite/help/23.1/Grid_Tutorial.html) and noticed that I had some rows with no firstName and LastName.  So, I thought I would use "fv!row.firstName" as part of the showWhen-attribute to prevent those rows from being show (see image below).  However, I am getting "scoping error" messages.  I know I can use query to filter out those rows but thought I would experiment with this approach because I have had issues with understanding local-variable scoping.  For example, when I use {} right after a!localVariables (), I get scoping error (see second image. 

Any responses to helping me understand local-variables/scoping would be appreciated.

Thank you.

Ma

  Discussion posts and replies are publicly visible

Parents Reply
  • Stefan,

    I can accept that Appian treats the curly-braces as the start of an expression.  Back to my original issue, which is why is using "fv!row" (image below) causing a scoping variable issue.  Isn't fv!row part of the gridField function that should be available at line:56?  It is available at line 55.  If passing it to the isNotNullorEmpty function is the issue, how do I access the value of fv!row in a function/expression for something like let's say to determine if the row is an odd or even row?

    Thanks for your help.

Children