⟵ hearthere ⟶
  • Training course
  • Creating simple tables and fields
  • Codes base level
  • Selects and links between tables
  • Table settings basic level
  • Prefilters base level
  • Conditional formatting basic level
  • Action codes base level
  • Using pop-up windows
  • Cycles base level
  • Roles and users on the web
  • Codes advanced level
  • Action codes advanced level
  • How can I get the previous value of a field and use it in the action code?
  • Strong action blocking by server conditions
  • At what moment is the data for the action codes taken?
  • Cross-execution of actions
  • Opening a nested temporary table and returning data to the parent table
  • Features of calling linkToInput and linkToButtons from popups
  • Relative list and number changes via set
  • Inserting rows after a certain row when sorting by order field
  • Using listReplace to execute actions
  • Using the panels of other tables
  • How to open the file upload window?
  • Using an arbitrary form in linkToInput
  • How to perform actions on the rows highlighted with checks?
  • Prefilters advanced level
  • Field and table settings advanced level
  • Cycles advanced level
  • Formatting advanced level
  • Select-Tree
  • Executing a scheduled action code
  • Printing and emailing
  • Notifications
  • API interaction
  • Adaptivity and Sections
  • How to perform actions on the rows highlighted with checks?

    $#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 ids. 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.