Document Properties - Triggers in QliView

This article provides an introduction to Triggers in QlikView applications.

This article provides an introduction to Triggers in QlikView applications.

Document properties of QlikView document

There are various document properties of QlikView documents, then go to Settings -> Document properties.

property

Now I introduce what a Trigger is in QlikView.

trigger

Introduction

A Trigger is a type of document property of a QlikView document. In the Trigger tab, we can set actions to be invoked on document events. The events like variable events and field events. All actions cannot be invoked from the event triggers.

The following is the various event triggers in QlikView documents.

  • Document event trigger
  • Field event trigger
  • Variable event trigger

Document event trigger

In this event trigger, in this group actions are set to trigger on selected events in the document. An event must be selected in the list before it is possible to assign actions or macros to it.

The various document event triggers actions are.

  • OnAnySelect
  • OnOpen
  • OnPostReduceData
  • OnPostReload
  • Add Action(s)

OnAnySelect

This event can be used to assign an action to be executed each time a selection has been made in any field of the QlikView document.

OnOpen

This event can be used to assign an action to be executed each time the QlikView document is opened. This event is not a function when running in the Ajax client.

OnPostReduceData

This event can be used to assign an action to be executed each time. In this event the reduce data command has been executed.

OnPostReload

This event can be used to assign an action to be executed each time the script has been re-executed.

Add Action(s)

In this tab, we add an action to the trigger. The action will be executed each time the selected document event occurs. When an action has been assigned to the event, the button changes to "Edit Action" and it is possible to change the action for the event. Always remind that the action is the same for all types of event triggers.

If we select the Add Action(s) button then this window will be opened.

select

Now this window will be opened. Here we add an action for the event trigger.

action

Field event trigger

This type of event trigger is always specified to the field in the document. In this group actions are set to trigger on changes in the logical state of a specified
field in the document. In this event trigger, there are a list of fields, then select  field from group list and do action.

After doing an action to the field, then the button changes to "Edit Action".

The various field event triggers actions are.

  • OnSelect
  • OnLock
  • OnChange
  • OnUnlock

OnSelect

This action will be executed each time when the selection has been made in the specified field.

OnLock

This type of action will be executed each time. This action locks the specified field.

OnChange

This type of action will be executed each time. When a selection has been made in any field, then it is logically associated with the specified field.

OnUnlock

This type of action will be executed each time. This action unlocks the specified field.

Variable event trigger

In this type of event trigger, we can set actions to trigger on changes in the contents of a specified variable in the document. When we work with this event trigger, select a variable from the list and press one of the buttons to assign an action to it.

The various variable event triggers actions are.

  • OnInput
  • OnChange

OnInput

This action will be executed each time. In this action a new value is directly entered in the selected or specified variable.

OnChange

This action will be executed each time. In this action the value of the selected variable changes as a result of changes in other variables or the logical state of the document. This typically applies when the variable contains a formula.

Summary

This article provided an introduction to triggers in QlikView and describes what triggers are in document properties.