⟵ 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
  • Highlighting the field in bold, text color and background color
  • Several formatting conditions
  • Locking and highlighting the whole row by conditions
  • Blocking changes in the field by conditions
  • What are text and comment in field formatting
  • Whole table formatting
  • Action codes base level
  • Using pop-up windows
  • 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
  • Blocking changes in the field by conditions

    formatting

    What parameter blocks a field change?

    block: true

    Is this a server-side block or client-side?

    This lock is on the client side — if a person knows JS, they will be able to send the value bypassing this lock.

    Therefore, locks through formatting are soft.

    About hard locks on the server side will be discussed later. Formatting locks are protection against finger errors.

    How do I unblock a field with a blocked row?

    If you have a row blocked through string formatting code, then if the field specifies block: false — the field will be unblocked.

    Field formatting takes precedence over row formatting.

    Is the field blocked only to change or to add, too?

    When block: true is passed, the field is blocked both for modification and during the addition process.

    How can I lock a field only when adding row?

    The string for adding does not have an id, therefore:

    f1=: setFormat(condition: #id = ""; block: true)
    
    

    How do I block a field for a role or user?

    There are two fast variables that return the role number or the user number:

    • $#nr — (from now roles) returns a list of user role numbers.

    • $#nu — (from now user) returns the user number in the user table.

    For example, to block in the addition row only for role 2:

    f1=: setFormat(condition: #id = ""; condition: $#nr = 1; block: true)
    

    For example, to block for everyone with status 3 and unblock for user 10:

    f1=: setFormat(condition: #status = 3; block: true)
    
    f2=: setFormat(condition: $#nu = 10; block: false)