From wiki.ginstr.com
Jump to: navigation, search

gn:act_queryItemSelect

gn:act_queryItemSelect is used specifically on the dropdown widget. When an action is triggered on a widget that binds (contains) this action, its value is used to perform a query on another table. When a result is obtained it populates the target widget which is set as an attribute value of this action with data from the query.

It’s important that in queries.xml, the dropdown that has performed the selection has field values that exist in dropdown which populates the data.

Can be used on widgets
any widget
Event trigger for action
Change of selected item on widget that contains this action. An alternative is a no event action in action set, conditional action.
Can be used as

Additional required attributes on bound widget

gn:data_source_request=”dbRequestName”
name of table (data source) for widget that performed selection

Additional required attributes on other widgets:

Dropdown which has to be populated:

  • gn:data_source_request=”dbRequestName” – name of table from which the data is queried for target dropdown
  • gn:data_version="number" – defines version of target dropdown table to query (table number is described on server side)
  • gn:data_source_field=”fieldname” – if data_source_request (table) from this widget contains more than one column, this attribute is required to define which column should be displayed when data is returned

Action signature

gn:act_queryItemSelect=[@+id/targetDropdownId]

Value field content

@+id/targetDropdownId
id of the dropdown which should be populated with the data from the query result.