ItemClick Event

Official Content
This documentation is valid for:

It allows programming actions when this event is triggered after clicking on an element of the query.

Syntax

&ItemClickData.{ Axis | Context | Filters | Name | Value }

When the event is triggered, its parameters are queried in the "ItemClickData" property. It returns an SDT with the following data:

  • Axis in which it was located.
  • Context is a collection of elements that provide information on all the elements included in the query with the values related to the clicked-on value.
    • For a plain table, it's a list of all the elements included in the query with the values for the row corresponding to the clicked-on cell (including hidden elements).
    • For a pivot table, clicking on a cell selects several tuples of the query result (all those that contributed to the value of this cell). The related values are, for each element in the query, the different values included in said tuples.
  • Filters is a collection of elements included in the pages with the list of values selected (only valid for Pivot tables).
  • Name of the element that was clicked on.
  • Value. The value contained in the clicked on cell.

Example

In this example, code is added to the event so that clicking on the Client Nr element opens a popup window showing the element name, its value and context.

Event QueryClients.ItemClick
    &StrContext = &ItemClickData.Context.ToJson() //&StrContext is a VarChar/LongVarChar/Character type variable
    &window.Object = PopupDialog.Create(&ItemClickData.Name,
                                        &ItemClickData.Value,
                                        &StrContext)
    &window.Width  = 400
    &window.Height = 300
    &window.Open()
EndEvent

ItemClick Event Sample

Chart

Is possible to execute the Click event in:

  • Data (columns in a Column Chart, points in Line Chart, etc.)
  • Labels

Scope

Output type: Table, PivotTable, Chart

 

See Also





Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.