⟵ hearthere ⟶
  • Training course
  • Creating simple tables and fields
  • Codes base level
  • Calculating a value by code
  • Calculation order and calculation order error, how to show the field in a place other than the calculation order
  • Recalculation unit of tables, recalculation of rows and their order
  • Header in simple and calculated tables
  • Using the functions
  • Using the if and select functions as an example
  • How the where and order parameters work, by the example of select
  • The difference between a single value and a list, operations on lists (sum, min, max, count)
  • Using math for mathematical operations
  • Using str to combine text
  • Fixing a calculation when executing codes
  • Manual values
  • Execute code only when adding
  • The $#nd, $#ndt and $#ntn quick variables
  • Dates processing
  • Calculation errors and their details
  • 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
  • Select-Tree
  • Executing a scheduled action code
  • Printing and emailing
  • Notifications
  • API interaction
  • Adaptivity and Sections
  • Using str to combine text

    using_str_to_combine_text

    How do I concatenate strings?

    There is a function strAdd(str: ""; str "")see documentation.

    But there is a faster way — using syntactic sugar


    =:
    str`"string 1" ++ "string 2"`

    One + concatenates without spaces.

    Two ++ with a space.

    Is it possible to use field data and reference to lines of code?

    Yes, if the value is specified in quotes, it will be processed as a string. If without quotes, then as a Totum code element.


    =:
    str`$S1 + "/" + $S2 ++ $S3` S1: "Cucumbers" S2: 2 S3: "(halved)" // Result: "Cucumbers/2 (halved)"

    Can str be used inside functions?

    Yes, str can be used inside functions:


    =:
    linkToDataText(title: "Window Title"; text: str`"Text from" ++ $num ++ "lines"`) num: 10

    How do I move to a new line when adding strings?

    There is a quick variable $#nl that adds a newline character:

    = : selectRowListForSelect(table: 'user'; field: 'name'; previewscode: $code)
    
    code: str` $s1 + $#nl + $s2` 
    
        s1: "=: listCreate(item: $rowCreate)"
        s2: "rowCreate: rowCreate(field: 'title' = 'Title'; field: 'value' = 'Calculated preview')"