⟵ 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
  • What are text and comment in field formatting

    formatting

    Does the text override the value?

    For display purposes, yes. But when accessing the field from any code, the value will still be taken.

    Can a field have an empty value but show text to the user?

    Of course. For example, if you need an information field that shows a constantly changing value in the warehouse — create an empty field and formatting:


    f1=:
    setFormat(text: $format) format: numFormat(num: $available; thousandssep: " "; unittype: " pcs") available: select(table: 'warenhouse'; field: 'available'; where: 'id' = #product)

    What is comment used for?

    comment does not override the main value of the field — it is displayed as an i icon. When hovered over, a tooltip with the content passed in comment will appear.


    f1=:
    setFormat(condition: math`$round / $calc` != 1; comment: "It looks like the box is incomplete") ~calc: #quantity / #capacity_pcs round: round(num: $calc;type: "down"; step: 1; dectimal: 0)