⟵ 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
  • Several formatting conditions

    formatting

    Can I use more than one condition?

    Yes, in setFormat, as well as in other functions that can handle condition — they are multiple. Formatting will only be applied if all condition are met as true.

    If one is evaluated as false — the subsequent ones will not even be calculated. Therefore, place the light conditions first, and the heavy ones in terms of calculation last.

    What happens if I write several consecutive conditions?

    Formatting can have several consecutive blocks:


    f1=:
    setFormat(bold: true) f2=: setFormat(condition: $#nfv < 0; color: "tomato") // Make everything bold, and those less than zero in red

    Blocks are sorted as strings, so 11 is less than 2 — you can use this to insert conditions between existing rules:


    f0=: f1=: f11=: f2=:

    A good practice is to arrange the lines in the order in which they will be executed.

    We recommend starting the first condition with f1=:, so you always have the option to insert the starting condition f0=:.

    How do I undo all previous set values?

    In those parameters where true/false is used, you need to pass the opposite value according to the conditions.

    Where values are passed, you need to pass an empty value to the parameter — "".

    For example, block everything and unblock the necessary one:

    f1=: setFormat(block: false)
    
    f2=: setFormat(condition: #status = false; block: true)
    

    For example, highlight everything under one condition and remove the highlight under another:

    f1=: setFormat(condition: #price >= 10000; color: "tomato")
    
    f2=: setFormat(condition: #price >= 20000; color: "")
    
    // Highlight in red where the price falls in the interval 10000 (inclusive) — 20000 (exclusive)