LogoLogo
Version 1.48
Version 1.48
  • nedyx
  • Welcome to nedyx
  • πŸš€Getting started
    • Preparation
    • Basic widget formatting
    • The first formula
    • More formulas
    • Combine several tables
    • Add a new page
    • Widget references across pages
    • Add a chart widget
    • Further adjustments
  • πŸ–ŠοΈWorking with nedyx
    • Apps
    • Live and Edit mode
    • The Header bar
    • Pages
    • Widgets
      • Widget types
      • Adding widgets
      • Widget selection
      • Widget positioning
      • Style tab
      • Content tab
      • Table widget types
      • Cell styles
      • Chart content
      • Chart properties
      • Undo / redo
    • Databases
      • Connect to a database
      • Get external data
    • File management
  • πŸ“–ClearLines Functions
    • General Aspects
      • Formula structure
      • The formula editor
      • Actions
      • Calculated widget properties
        • Content property
        • Cell styles property
        • Chart labels
        • Column widths and Row heights
        • Connection property
        • Editable property
        • MinY and MaxY properties
        • Style property
        • Tooltips
        • Visible property
      • Ranges
      • Widget references
      • Widget cell references
      • Menu widget synchronization
    • Action functions
      • ACTIONCOLUMN
      • ACTIONCONTENT
      • ACTIONROW
      • CLICK
    • Database functions
      • CALLURL
      • EXECUTE
      • GETDATA
      • GETDBCOLUMNNAMES
      • GETSTATEMENT
    • Date functions
      • CREATEDATE
      • DATE
      • DATETOTEXT
      • DAY
      • GETTIMEZONEOFFSET
      • HOUR
      • MILLISECOND
      • MINUTE
      • MONTH
      • SECOND
      • TODAY
      • WEEKDAY
      • YEAR
    • Import / export functions
      • DOWNLOAD
      • DELETEFILE
      • DOWNLOADFILE
      • EXCELCREATE
      • GETFILELIST
      • PDFCREATE
      • POSTMESSAGE
      • SCANCODE
      • SENDEMAIL
      • UPLOAD
      • UPLOADFILE
    • Logical functions
      • AND
      • IF
      • ISEMPTY
      • ISUSERACTION
      • LOOP
      • NOT
      • OR
    • Mathematical functions
      • ABS
      • EXP
      • LN
      • LOG
      • MAX
      • MIN
      • MOD
      • MROUND
      • NUMBER
      • PI
      • RAND
      • ROUND
      • SQRT
      • SUM
    • Navigation functions
      • CLOSE
      • GETURLPARAM
      • MESSAGE
      • OPEN
      • OPENWEBPAGE
      • QUESTION
    • Range functions
      • AGGREGATE
      • CELL
      • CELLREF
      • CLEAR
      • COLUMN
      • COLUMNS
      • COMBINE
      • CONVERT
      • COUNT
      • CSVTORANGE
      • CUMULATE
      • DIFF
      • EMPTY
      • FILTER
      • GETTYPE
      • INSERTRANGE
      • INTERSECTION
      • LOOKUP
      • RANGE
      • RANGETOCSV
      • RANGETOHIERARCHY
      • ROW
      • ROWS
      • SEQUENCE
      • SORT
      • TRANSPOSE
      • UNIQUE
      • VISIBLEHIERARCHY
    • Text functions
      • CHAR
      • CODE
      • CREATEMEMBER
      • FIND
      • HIDDENTEXT
      • HTMLTOJSONTEXT
      • LEFT
      • LEN
      • LOWER
      • MID
      • RIGHT
      • SUBSTITUTE
      • TEXT
      • TRIM
      • UPPER
    • User management functions
      • APPLIST
      • ADDUSER
      • APPSHARELIST
      • REMOVEUSER
      • SHAREAPP
      • UPDATEUSER
      • USERLIST
      • USERNAME
    • Widget functions
      • GETSELECTION
      • LOADWIDGETCONTENT
      • NAME
      • PAGE
      • SETSELECTION
      • STOREWIDGETCONTENT
      • UPDATE
  • πŸ”Security
    • User Management
      • Workspaces
      • Workspace Roles
      • Adding Users to a Workspace
      • App Roles
      • Share an App with Other Users
      • Guest Access
      • Change Password
  • Appendix
    • Keyboard shortcuts
    • Error handling
    • Feature preview
    • Supported browsers
    • System requirements for on-premises installations
Powered by GitBook
On this page
  1. ClearLines Functions
  2. Range functions

RANGETOHIERARCHY

Converts a range to a hierarchy.

Syntax

RANGETOHIERARCHY(range; numLevels; numExpandLevels)

  1. range - the range containing the hierarchy information - Value type: range

  2. numLevels - the number of columns at the beginning of range defining the hierarchy - Value type: number

  3. numExpandedLevels - the number of levels of the hierarchy which should be expanded - Value type: number (optional, default value: numLevels)

  4. aggregationType - specifies how empty values in the additional columns of the hierarchy should be aggregated - Value type: text (optional, default value: β€œnone”) Possible values are:

    1. "none" - no additional aggregation

    2. "sum" - using the sum of the children

    3. "min" - using the minimum value of the children

    4. "max" - using the maximum of the children

    5. "avg" - using the average value of the children

Return

The result is a range with

  • the hierarchy level in the first column

  • the display name in the next column (extracted from the first numLevels columns of range)

  • all remaining columns of range

  • all levels up to numExpandedLevels are expanded, all other levels are collapsed

Examples

In the following examples, the widget on the left is a table widget of type "Hierarchy".

Example 1 - The whole table is used as hierarchy.

Example 2 - like example 1, but with an additional column containing values for the hierarchy.

Example 3 - The hierarchy is only defined by the first 3 columns. The remaining 2 columns are added to each row of the hierarchy.

Example 4 - Parameter 3 specifies that only the first two levels of the hierarchy are expanded by default.

PreviousRANGETOCSVNextROW
πŸ“–