Filter in workflow of identity attribute changed

Hi team, I am trying to add filter in my identity attribute changed trigger when I am using this but getting json error . For personalResidential and 2 other attributes I want new values should be true then only it should hit .

Filter I am trying to use :
$.changes[?(@.attribute == “accountLocked”||@.attribute == “isallagencyAccess”|| @.attribute==“isparentorganization”|| @.attribute ==“organization”|| @.attribute ==“producerStatus”|| @.attribute==“organizationId”||(@.attribute == “ispersonResidential” && @.newValue==true) ||

  • (@.attribute == “iscommercialResidential” && @.newValue==true)|| (@.attribute == “ispersonResidential” && @.newValue==true) || @.attribute ==“firstname”)]*

Hi @Faizan9097 ,

I just noticed that the line @.newValue=="true" is missing the double quotes. Just try the below one.

$.changes[?(@.attribute=="accountLocked" || @.attribute=="isallagencyAccess" || @.attribute=="isparentorganization" || @.attribute=="organization" || @.attribute=="producerStatus" || @.attribute=="organizationId" || (@.attribute=="ispersonResidential" && @.newValue=="true") || (@.attribute=="iscommercialResidential" && @.newValue=="true") || (@.attribute=="ispersonResidential" && @.newValue=="true") || @.attribute=="firstname")]

Thanks! - Gokul

1 Like

Can’t I make it boolean

The values which are compared will be string right.

it is boolean value which we are are comparing and also boolean value come in newValue.

Yeah, I agree this.

But as per the trigger, it’s not seeing the data type of the value. Like this is just checking the value which is given by you and the thing which is present in the json, matches.

1 Like

Can we check datatype in trigger also

I think no. But we can use check boolean operator after the trigger.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.