⟵ 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
  • How to open another table by clicking a button?
  • Hide the header or footer, update the source table when closing the window, close the window forcedly
  • Temporary table creation and features
  • How do I fill in the rows part by passing data to the header?
  • How can I use a temporary table for background calculation and get a result without showing it to the user?
  • How to open a text input window and how can it be modified?
  • Showing the panel with buttons
  • Cycles base level
  • Roles and users on the web
  • Codes advanced level
  • Action codes advanced level
  • 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
  • Showing the panel with buttons

    link_to_input

    Which function opens a window with buttons?

    linkToButtons — you can specify multiple buttons with different codes.

    =: linkToButtons(title: "Red or Blue"; buttons: $buttons; width: 400; html: "YOU ARE NEO")
    
    buttons: listCreate(item: $btn1; item: $btn2)
    
    btn1: rowCreate(field: "text" = "Red"; field: "code" = $code1; field: "icon" = "link"; field: "background" = "seashell"; field: "color"="red"; field: "vars" = $vars1; field: "refresh" = false)
        vars1: rowCreate(field: "var1" = "You chose the red pill")
    
        ```code1:totum 
        =: linkToDataText(title: "III"; text: $#var1)
        ```
    
    btn2: rowCreate(field: "text" = "Blue"; field: "code" = "name_field_in_table"; field: "icon" = "link"; field: "background" = "eliceblue"; field: "vars" = $vars2;  field: "refresh" = true)
        vars2: rowCreate(field: "var1" = "You chose the blue pill")
    
    // text and code are mandatory parameters in row, others are not.
    
    // Result: An active panel with two buttons, clicking on each of which opens a panel with text.
    
    

    What are the ways to pass code to it for further execution?

    The linkToButtons has a buttons parameter that takes a list of buttons. Each line in this list describes a button.

    Each line must have a row where the button parameters are specified:

    =: rowCreate(field: "text" = "Red"; field: "code" = "field_code"; field: "icon" = "link"; field: "background" = "seashell"; field: "color"="red"; field: "vars" = #vars; field: "refresh" = false)
    

    There are two mandatory parameters — text and code, the rest are optional.

    Is it possible to pass code with a standard reference to a line of code?

    No — see the previous lesson about linkToInput.

    Do the codes get the environment parameters?

    By default, the code receives some environment parameters:

    • $#ntn — the name of the table from which input is called

    • $#nh — the hash of the current table (we will discuss this in advanced action codes)

    • # — all grids of the current table.

    Other variables can be passed through the vars parameter.