userguides
  • Welcome
  • Contact Us
  • Getting Started
    • Quickstart
    • Inside ViewZen
  • ViewZen Accounts
    • Overview
    • Account Owner
    • Home Page
    • Member Profile
      • My Account
      • My Organization
      • Security
      • Permissions
    • Roles and Permissions
      • Standard Roles
      • Custom Roles
    • User Management
    • User Groups
    • Multi factor Authentication
    • Context based Permissions
    • API Keys
  • Appverse
    • Overview
    • Home Page
    • Apps
      • Create an App
        • Folders
          • Create
          • Edit
          • Delete
          • View Contents
        • Roles
        • Forms
          • Create
            • Get Familiar
              • General Properties
              • Hint
              • Appearance
              • Validations
                • Examples
              • List of Values
              • Scope
                • Examples
              • Search Settings
              • Security
              • Expressions
              • Appverse Expressions
                • Examples
              • Choices
              • Instance Name
              • Download Form
              • Import Form
            • Best Practices
            • Create with Form Builder
            • Create with GenAI
            • Create with ODK compatible xls
          • Edit
          • Delete
          • Deploy / Undeploy
          • Settings
            • General Settings
            • Data Display
            • Appearance
            • Languages
            • Auto Numbering
            • Lookup
            • Child Forms
            • Report Template
            • Validations
            • Data Formatting Rules
            • Record Access
            • Quick Filters
          • Allocation
            • Get Familiar
              • General Properties
              • View Permissions
          • Quick Configuration
          • Events and Actions
            • Save to DB
            • Lock Record
            • Update Status
            • Create / Update Record
            • Send Notifications
            • Custom Scripts
          • Conditions in Appverse
          • Advanced Search
          • Data
            • Card Layout
            • Grid Layout
            • Master Detail Layout
          • Dashboards
            • Publish Dataset
            • Dashboard
        • Dashboards
          • Link
      • Edit an App
      • Delete an App
      • List of all Apps
      • Publish an App
      • Export & Import an App
    • User Allocation
    • Library
      • Custom Scripts
      • Custom Queries
      • Report Templates
    • Departments
    • Settings
  • ViewZen Analytics
    • Overview
    • Landing Page
    • Dashboard
      • List of Dashboards
      • Create a Dashboard
        • Get Started
        • Datasets
        • Sheets
        • Version Control
        • Toolbar
          • Place Components
            • Properties
              • Data Properties
                • Data Fields
                • Inbuilt Aggregation Functions
                • Dimensions
                • Measures
                • X-axis and Y-axis
                • Column
                • Data Series
              • Format Properties
                • Title / Sub Title / Label
                • Appearance
                • Legend
                • Viewer Settings
                • General Settings
                • Axis Settings
                • Axis Label Settings
                • Axis Title Settings
                • Label Formatting
                • Sorting
                • Color Formatting
                • Column Formatting
                • Stacked Header
                • Footer
                • Actions and Events
                • Chart Settings
                • Grid Settings
                • Data Series Formatting
                  • Value Series
                  • Column Series
                  • Stacked Column Series
                  • Radar Column Series
                  • Waterfall Series
                  • Line Series
                  • Bubble Series
                  • Pie Series
                  • Donut Series
                  • Funnel Series
                  • Clustered Area Series
              • Tooltip Properties
                • Properties
            • Visuals
              • Cards
              • Charts
              • Grid
              • Textbox
              • Filter
              • Image
              • Zone
            • Visuals Marketplace
          • Edit Components
          • Delete Components
        • Filters
          • Fixed Filters
            • Create Filter
              • Filter Conditional Statements
            • Edit Filter
            • Delete Filter
          • Interactive Filters
            • Create Filter
            • Edit Filter
            • Delete Filter
      • Edit a Dashboard
      • Share a Dashboard
      • Delete a Dashboard
      • View a Dashboard
      • Use Dashboard for Presentations
Powered by GitBook
On this page
  1. Appverse
  2. Apps
  3. Create an App
  4. Forms
  5. Create
  6. Get Familiar
  7. Appverse Expressions

Examples

Some example of calculation expressions are as under

Required Calculation
Expression

No of days to today

today() - ${start_start}

Sum of three numbers

${number1} + ${number2} + ${number3}

Average of three numbers

(${number1} + ${number2} + ${number3}) div 3

First 3 characters of a string

substr(${string}, 0, 3)

Length of a string

string-length(${string})

Weighted average of two numbers

(${number1}*${weight1} + ${number2}*${weight2}) div (${weight1} + ${weight2})

Add 30 days to a given date

date(${my_date} + 30)

Maximum of two numbers

max(${number1}, ${number2})

Get string 'Even' or 'Odd' of a number

if(${number} mod 2 = 0, 'Even', 'Odd')

Calculate age from date of birth

int((today() - ${dob}) div 365.25)

Nested if

if(${number} < 5, 'Less than 5', if(${number} >= 5 and ${number} <= 10, 'Between 5 and 10', if(${number} > 10 and ${number} < 25, 'Greater than 10 and less than 25', 'Greater than 25')))

Check if date is Saturday or Sunday

if(format-date(${my_date}, '%a') = 'Sat' or format-date(${my_date}, '%a') = 'Sun', 'Weekend', 'Weekday')

Leap year

if(${my_year} mod 400 = 0 or (${my_year} mod 4 = 0 and ${my_year} mod 100 != 0), 'Leap Year', 'Not a Leap Year')

PreviousAppverse ExpressionsNextChoices

Last updated 3 months ago