Skip to main content
December 13, 2021
Question

Expression rule

  • December 13, 2021
  • 6 replies
  • 0 views

Hi guys,

I am new to appian, anyone explain this code line by line briefly.

if(rule!AF_RULE_General_isBlank(wherecontains(cons!GCC_DSE_cons_getReadOnlyDrillStatus, tointeger(local!drill.drillStatus))),

remove(local! facilityFloors, wherecontains (false,local! facilityFloors.isActive)),

if(not(rule!AF_RULE_General_isBlank(local!drillfacilityFloors)),

local! drillfacilityFloors,

remove(local!facilityFloors, wherecontains (false,local!facilityFloors.isActive))))

6 replies

stewart.burchell
December 13, 2021

Hi Vamsi

Firstly, for future reference, please use the "Insert Code" option to include code in your posts as it makes it way easier to read/copy/paste for those of us who are trying to help:

Secondly: the code doesn't look well-formed to me. Pasting it into the Expression Editor it throws a syntax error:

December 13, 2021

if(rule!AF_RULE_General_isBlank(wherecontains(cons!GCC_DSE_cons_getReadOnlyDrillStatus,tointeger(local!drill.drillStatus))),
remove(local! facilityFloors, wherecontains (false,local! facilityFloors.isActive)),
if(not(rule!AF_RULE_General_isBlank(local!drillfacilityFloors)),
local! drillfacilityFloors,
remove(local!facilityFloors, wherecontains (false,local!facilityFloors.isActive))))
now see the code i have inserted

stewart.burchell
December 13, 2021

Same code, same syntax error

Expression evaluation error: Syntax error. Details: Cannot create an identifier with zero length key:

...that is, this code will never work as it stands.