Skip to main content
Participating Frequently
Dec 13, 2021 1:58 PM UTC
Question

Expression rule

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
Employee
Dec 13, 2021 2:24 PM UTC

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:

Participating Frequently
Dec 13, 2021 3:42 PM UTC

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
Employee
Dec 13, 2021 3:50 PM UTC

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.