Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
Does anyone know if there is any way to trigger a macro when a text object has a specific value.
For example if the text object contains the string 'Warning' run a macro that will send e-mail to specific people.
Kind Regards,
Nikolaos Kavroulakis.
Alerts cannot be assigned to an Alternate State. However, the alert Condition or Message can reference an alternate state in the expression like:
sum({[StateA]} Sales) < 0
I'm not sure what the use case for referencing Alt States in an alert would be. Alt States are associated with user selections which don't come into play in an Alert unless you are applying bookmarks in the Alert.
-Rob
The text object is getting its value from somewhere. For example a variable changes or a selection is made. You need to add the Run Macro action on the event trigger of the event that causes the change. That could be an OnSelect field event trigger or an OnInput or OnChange variable event trigger. See the Triggers tab of the document properties window.
Hi Wassenaar,
The text object takes its value from the expression
=if( $(eOutOfBoundRate) >=$(vWarningRate) , 'WARNING','NORMAL')
So where i want to get to eventualy is when the text object contains 'WARNING' trigger a macro that will send
an email to specific people.All the selections are locked and to not change.The only thing changing is the value of the expression.Is that possible???
Regards
You're using two variables: eOutOfBoundRate and vWarningRate. You need to figure out which variable changes and should have the action assigned to its OnChange and/or OnInput event trigger. Maybe you need to add it to triggers of both variables.
Hi again Gysbert,
vWarningRate is a predetermined number and does not change.
eOutOfBoundRate is an expression that is changing only with the reload of the data as we can not deselect any data due to that every field is locked.
So I guess if i set up an action on the varible eOutOfBoundRate on variable event trigger when i reload the data it will trigger the macro by default....
What i actualy want is something like if( $(eOutOfBoundRate) >=$(vWarningRate) , '''' RUN MACRO '''''')
Consider using an Alert instead of a macro. Much easier. You can see an example of doing something like your problem here:
http://qlikviewnotes.blogspot.com/2010/09/monitoring-reload-schedule.html
Your alert condition would be:
$(eOutOfBoundRate) >=$(vWarningRate)
-Rob
Thanks a lot for the quick responce Rob.
There is an issue with my implementation if i use alert because i have to many alternate states.
Does Alerts support alternate states so that i can have the same condition for different states??
Alerts cannot be assigned to an Alternate State. However, the alert Condition or Message can reference an alternate state in the expression like:
sum({[StateA]} Sales) < 0
I'm not sure what the use case for referencing Alt States in an alert would be. Alt States are associated with user selections which don't come into play in an Alert unless you are applying bookmarks in the Alert.
-Rob