Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

filtering event subscription api

Avatar

Level 10

Hello. I have another event subscription api question. I have a checkbox custom field that I want to keep an eye out for. I want to act on this field when it's changed on the project whether it gets ticked or unticked.

I thought that I should filter it by newState and oldState but I can't create the subscription. If I just create by newstate, it doesn't trigger when someone unticks the checkbox. I have also tried to create two subscriptions, one with the oldState and one with the newState and it's giving me an error when setting the second subscription. Any directions on this one?

{

"objCode": "PROJ",

"eventType": "UPDATE",

"url": "xxxx",

"filters": [

{

"state": "newState",

"fieldName": "parameterValues",

"fieldValue": {

"DE:customfield": "1"

}

},

{

"state": "oldState",

"fieldName": "parameterValues",

"fieldValue": {

"DE:customfield": "1"

}

}

]

}

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Level 10

I'm writing this comment down in case others are looking into the same issue as I have.

I tried to do a workaround by setting it up as 2 subscriptions, one with the oldState and another with a newState but going to separate urls. And theoretically, it works if your user is just ticking and unticking that one checkbox. However, if there are more than 1 checkbox that gets ticked/unticked, then it doesn't trigger the newState and oldState. The event subscription api operator only has eq, ne, gt and lt; it does not have contains, notcontains. Event subscription api is missing quite a few things - I hope they do update documentation and update the event subscription api so that we don't have to accept a slew of data just because we can't trigger on specifics.