$#ids example
= : if(condition: $#ids = $#lc; then: $text; else: $action)
text: linkToDataText(title: "Warning"; text: "No rows selected")
action: setList(table: $#ntn; field: 'status' = 3; where: 'id' = $#ids; log: true)
First, we check if anything is selected, and then we perform the action.
This works for button action code. The id
of the selected rows is passed to the variable $#ids
as a list
, so in this example, we compare $#ids
with an empty list.
Strictly speaking, here we could compare it with ""
as there are no empty id
s. But we are for proper consistency!
Why is the Uncheck After Execution option needed?
We recommend unchecking the boxes after completion, as the user might perform the next action, forgetting that they have selected rows left from the first action.