Use of { & } to delimit functions in an object

I'm in a discussion with a colleague on whether its legal to use {} to delimit nested variables in an if statement.

I.e.:

if(
{                 this

and(or(
isnull(local!shortRecon.recordsRequested),
isnull(local!shortRecon.reconsiderationRequested)
),
local!claim.claimStatusId<>cons!OWB_DBID_LOOKUP_ID_CLAIM_STATUS_FINAL_ORDER_ISSUED
)
},                 and this


{                 this

if(isnull(local!shortRecon.recordsRequested),a!save(ri!recon.recordsRequested,false),{}),
if(isnull(local!shortRecon.reconsiderationRequested),a!save(ri!recon.reconsiderationRequested,false),{})

},                 and this
{}
)

Is this acceptable use?

  Discussion posts and replies are publicly visible

Parents
  • I'm not even sure what you mean by "nested variables" in the context of the code sample you've posted here.  Any chance you could post a cleaner example, with indentation, and in a Code Box where it'll maintain some amount of readability?  If any of the wording ("and this" etc) is meant as annotative, then put it in /* comment blocks */ for clarity.

    I will say, up front, that you can nest and() and or() conditional logic to almost any level (limited only by a viewer's ability to make sense of whatever spaghetti code we end up creating), which never requires "{}" - since as Stefan correctly noted, these specifically incidate arrays to Appian.

Reply
  • I'm not even sure what you mean by "nested variables" in the context of the code sample you've posted here.  Any chance you could post a cleaner example, with indentation, and in a Code Box where it'll maintain some amount of readability?  If any of the wording ("and this" etc) is meant as annotative, then put it in /* comment blocks */ for clarity.

    I will say, up front, that you can nest and() and or() conditional logic to almost any level (limited only by a viewer's ability to make sense of whatever spaghetti code we end up creating), which never requires "{}" - since as Stefan correctly noted, these specifically incidate arrays to Appian.

Children