⟵ 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
  • Prefilters advanced level
  • Field and table settings advanced level
  • Cycles advanced level
  • Formatting advanced level
  • Extra buttons in the context panel
  • Additional pictures and texts in the right-click panel
  • Using texts replace the field value
  • Block adding or deleting by the number of rows in the table
  • Hiding fields by conditions
  • Displaying buttons in the rows part
  • Select-Tree
  • Executing a scheduled action code
  • Printing and emailing
  • Notifications
  • API interaction
  • Adaptivity and Sections
  • Using texts replace the field value

    Is it possible to take the text as a field value by code?

    No. The text parameter of the setFormat function only changes how the value is displayed in the field and does not change the value itself.

    How can I format numbers using text?

    All negative values are represented as (1 000.00):


    f1=:
    setFormat(condition: $#nfv < 0; text: $text) text: strAdd(str: "("; str: $numform; str: ")") numform: numFormat(num: $mod; decsep: ","; thousandssep: " ") mod: modul(num: $#nfv)

    How can I format numbers with prefix, postfix, and divider parameters?

    For fields of type Number, there are parameters that define formatting:

    All subsequent child parameters to Currency override it if filled:

    For these parameters, you can specify different values for positive and negative numbers using the separator ** — to the left of the separator for positive, to the right for negative.

    Example of using text to calculate dynamic information

    Sometimes it is necessary to display the sum in the footer field taking into account the prefilter.

    If you simply do:


    =:
    listSum(list: $list) list: selectList(table: $#ntn; field: 'field')

    Then the sum will not change depending on the selected prefilter. But writing a reference to the prefilter in the where clause in the code would be fundamentally incorrect!

    Therefore, the Code remains empty, and everything is written in the formatting:


    f1=:
    setFormat(text: $sum) sum: listSum(list: $list) list: selectList(table: $#ntn; field: 'field'; where: 'connect' = #fl_connect)