How can I compare two attributes?
Example:
Bot - New Message —> Filter:
OUTPUT: {{bot_new_message.attributes__sim-dati}}
IS GREATER THAN
VALUE: {{bot_new_message.attributes__sim-voce}}
It doesn’t work
How can I compare two attributes?
Example:
Bot - New Message —> Filter:
OUTPUT: {{bot_new_message.attributes__sim-dati}}
IS GREATER THAN
VALUE: {{bot_new_message.attributes__sim-voce}}
It doesn’t work
No, sorry, we don’t yet have outputs in the ‘value’ box. Instead, you could maybe use the code service to compare them (obviously you’d need to know a little JavaScript).
thanks John. Have you got a little example so I can copy it?
Sorry but my skill on programmer in JavaScript are… zero
thank you
Sure, you can use this to compare 2 attributes named foo
and bar
:
If they are identical, the output from the code will be true
, and if they are different, it will be false
.
To do greater than or less than, use inputs.foo <= inputs.bar
etc…
Hope that’s helpful!
Hi!
Will there be any updates to this mechanism down the roadmap? I’m using a Webhook service that requires filtering (via comparing 2 values sent through the Webhook), otherwise it’s eating too many interactions…
Please let me know if there’s a way to do that, filtering in code is not an option (did that already, but the interactions are fired anyway).
Cheers,
Szymon
Yes we will be enabling this soon - certainly we’d like to do it. We know how handy it will be, just we have to prioritize certain things. Thanks for your patience.
Hey @johnjackson,
A little helping hand for a Javascript rookie…
I’m trying filter an action based on whether Output X is greater than Output Y OR whether Output Y contains a certain letter.
I’ve used the code you super-helpfully outlined above to do the first part, but I’m not sure how to add the second part.
Can you help?
Thank you!