ItemExpand Event

Unofficial Content

It allows programming actions when the user expands a QueryElement that contains nested data, showing the values of the subsequent level.

Syntax

&ItemExpandData.{ ExpandedValues | Name | Value }

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

  • Name. Name of the element that was expanded.
  • ExpandedValues. The list of values contained in the expanded cells.
  • Value. The value contained in the expanded cell.

Example

In this example, when an investor's row is collapsed in the ClientId QueryElement, its amount mustn’t be considered in the total represented in the WebLinearGauge control. Therefore, when the expand action is performed, the client is searched for in the LoadDataClientsSDT –this SDT was loaded in the Start event–, the amount is added to the total and sent to the WebLinearGauge control.

The &ItemExpandData variable is based on the QueryViewerItemExpandData SDT.

Event QueryClients.ItemExpand
    If &ItemExpandData.Name = 'ClientId'
       for &TheClient in &LoadDataClientsSDT
           &ClientId = Val(&ItemExpandData.Value)
           if &TheClient.ClientId = &ClientId
              &Amount = &TheClient.ClientAmount
           endif
      endfor
      &GaugeSDT.Value = &UCLinear + &Amount
EndEvent

Scope

Output type: PivotTable

 

See Also

ItemCollapse Event
Item Expand Data property