Grid: Remove row
See also: Grid: Fill, Grid: Clear, Grid: Add row(s), Grid: Replace selected rows
Actions – Abstract
The action Grid: Remove row removes one or more rows from a Data grid linked as a Target element or one of the other List elements, if the service configuration of the target element allows this.
The action Grid: Remove row removes one or more rows from a Data grid linked as a Target element or one of the other List elements, if the service configuration of the target element allows this.
►IMPORTANT◄ The specification of a target element from the group of List elements is required so that this action can be selected under Action type.
The row(s) to be deleted from the Target element must exist as input data ($input) for the action. A target row is deleted if the associated data item is identical to the input data or is contained in a list of objects passed. The transfer of another data item (e.g. a copy) with identical content is not accepted.
Suitable input data provides, for example, behaviour types Selected item of grid or Selected items of grid respectively, or triggers like Item selected or Item click. However, depending on the type of Target element and its configuration, it must be noted that the 'selected rows' may represent the value of the element, while the action Grid: Remove row always removes rows from the list that is the basis for a selection. The selection itself remains even if the underlying list entry is removed. Therefore, removing a selection option at runtime may have no visible effect unless the rows removed from the list are also 'deselected'.
Example
For a truck transport, a suitable Crew should be assembled based on available candidates in a certain Driving staff pool. Within the crew, the role of Drivers and Assistants must be filled. Multiple allocations should be possible.
Assigned candidates should be removed from the Driving staff pool selection list, so that contradictory assignments (within the same crew) are excluded.
Runtime example:
From a Driving staff pool (left) with four candidates originally (with the B or B/C 'License') a 'Driver' has already been assigned for the Crew in the image.
The role to be assigned within the Crew is determined via the centrally positioned Combobox element with the two options Drivers and Assistants.
An assignment is triggered by clicking on one of the entries in the Driving staff pool data grid. The clicked 'row' is then removed on the left and added to the chosen Data grid ('Driver' or 'Assistant') on the right.
Configuration:
|
For the Driver staff pool Data grid, two similarly structured behaviours are configured for assigning a candidate as 'Driver' or 'Assistant'. As an example, the 'pickAssistant' behaviour concerning the 'Assistant' is discussed below:
|
►NOTE◄ The action Grid: Remove row could also be used in a mirrored approach to remove assigned 'Drivers' and 'Assistants' when the Item click is clicked from the respective Data grid elements. However, the action Grid: Add row(s) should then also be executed to add these options to the 'Driving staff pool' again.