Page 1 of 1

Changing values in global list does not fire trigger

Posted: 26 Nov 2013 12:17
by kintrupf
When a value is added to or removed from a global list variable a trigger associated with the variable is not fired.

Example:
I have a trigger where I want to respond to changes in the list global_testList.
In a flow I add or remove values to the list global_testList with the functions addElement and removeElementValue like this:

Code: Select all

global_testList = addElement(global_testList, 'Test')
global_testList = removeElementValue(global_testList, 'Test')
global_testList = addElement(global_testList, 'Test2')
The trigger above is only fired when the list is assigned first (or created), but never on the subsequent changes of its contents.

Re: Changing values in global list does not fire trigger

Posted: 02 Dec 2013 18:03
by Martin
Hi,

That's the intended behavior. A trigger Global Variable is only executed when another value is assigned to a global variable which is not the case when a list is modified by adding/removing an element. The global variable still points to the same list in such a case.
You could use another variable which is incremented by one when you modify the list and trigger on this variable.

Regards,
Martin

Re: Changing values in global list does not fire trigger

Posted: 03 Dec 2013 07:00
by kintrupf
Martin wrote:The global variable still points to the same list in such a case.
Currently I use an "Execute flow" action afterwards to call the flow that should have been triggered by changing the list variable.
It works but I need to remember to put it into each flow. And since I use that variable a lot in my flows it tends to clutter the flows somewhat :(