System values

You use system values in various Web Dashboard objects to represent values calculated from data extracted from the database.

You can use system values for the following activities:

  • Set default filter for a dashboard.
  • Filter the results of a search or report.
  • Set up a value for a conditional formatting for a report.
  • Set up a constant in a Calculated fields formula for a report.
  • Configure the result file name in case you export reports and dashboards using tasks.
  • Configure threshold and/or a message in a control.
  • Set up a context field in data dictionaries of standard type.
  • Set up data dictionaries of type SQL, in the query.
  • Set up filters in External components.
  • Set the default value for a field in a form.

There are three families of system values:

Date extraction

Use date extraction system values to calculate a numerical value based on the current date. These system values use the ISO week date:

System Value

Syntax Returned Information Examples
Year {s:year[+|-]n} Returns the current year, offset by n years.

{s:year} - current year

{s:year-1} - previous year

{s:year+1} - next year

Month {s:month[+|-]n} Returns the number of the month in the current year, offset by n months.

{s:month} - the number of the current month

{s:month-1} - the number of the previous month

{s:month+1} - the number of the next month

Week of month {s:weekofmonth[+|-]n} Returns the number of the week in the current month, offset by n weeks.

{s:weekofmonth} is 1 if today is first Thursday of the month

{s:weekofmonth} is 5 if today is last day of the month

Week of year {s:weekofyear[+|-]n} Returns the number of the week in the current year, offset by n weeks.

{s:weekofyear} is 1 if today is 4th of January (as per ISO standard)

{s:weekofyear} is 52 or 53 if today if last week of the year

Day of year {s:dayofyear[+|-]n} Returns the number representing the day of the year, offset by n days

{s:dayofyear} - the current day of the year (ex. 262)

{s:dayofyear-2} - 2 days before the current day of the year (ex. 260)

{s:dayofyear+3} - 3 days after the current day of the year(ex. 265)

Day of month {s:dayofmonth[+|-]n} Returns the day of the current month, offset by n days.

{s:dayofmonth} - the current day of the month

{s:dayofmonth-1} - the previous day of the month

{s:dayofmonth+1} - the next day of the month

Day of week {s:dayofweek[+|-]n} Returns the day of the week, offset by n days. A week starts with Sunday which has day number 1. Each day correspond to a day number.

{s:dayofweek} - 3 (Day number 3 correspond with Tuesday)

{s:dayofweek-2} - 1 (Day number 1 correspond with Sunday)

{s:dayofweek+3} - 6 (Day number 6 correspond with Friday)

Hour in day {s:hour[+|-]n} Returns the hour in the current day, offset by n hours.

{s:hour} - the current hour of the day

{s:hour-1} - the previous hour of the day

{s:hour+1} - the next hour of the day

Minute {s:minute[+|-]n} Returns the minute in the current hour, offset by n minutes.

{s:minute} - the current minute of the current hour

{s:minute-1} - the previous minute of the current hour

{s:minute+1} - the next minute of the current hour

Second {s:second[+|-]n} Returns the second in the current minute, offset by n seconds.

{s:second} - the current second of the current minute

{s:second-1} - the previous second of the current minute

{s:second+1} - the next second of the current minute

Millisecond {s:millisecond[+|-]n} Returns the millisecond in the current second, offset by n milliseconds.

{s:millisecond} - the current millisecond of the current second

{s:millisecond-1} - the previous millisecond of the current second

{s:millisecond+1} - the next millisecond of the current second

Relative date

You use relative date system values to calculate future or past dates based on the current date.

System Value

Syntax Returned Information
Now {s:now[[+|-]n[d|w|m|y|h]]} Returns the current date and time offset by n days/weeks/months/years/hours.
Current hour {s:currenthour[[+|-]n[d|w|m|y|h]]} Returns the current date and time truncated to hours and offset by n days/weeks/months/years/hours.
Today {s:today[[+|-]n[d|w|m|y|h]]} Returns the current date offset by n days/weeks/months/years/hours.
First day in week {s:firstdayinweek[[+|-]n[d|w|m|y|h]]} Returns the first day in the current week offset by n days/weeks/months/years/hours.
First day in month {s:firstdayinmonth[[+|-]n[d|w|m|y|h]]} Returns the first day in the current month offset by n days/weeks/months/years/hours.
First day in year {s:firstdayinyear[[+|-]n[d|w|m|y|h]]} Returns the first day in the current year offset by n days/weeks/months/years/hours.

User session

You use the user session system values to represent data related to the current user session. These values can vary depending on the user connected.

System Value

Syntax Returned Information
Session identifier {s:usersessionguid} Returns the unique identifier of the current session. When a user cannot be identified (as in the case of a metric task, for example), a null value is returned.
User name {s:username} Returns the user name of the connected user. When a user cannot be identified (as in the case of a metric task, for example), a null value is returned.
User login {s:userlogin} Returns the user login of the connected user. When a user cannot be identified (as in the case of a metric task, for example), a null value is returned.
User's entity name {s:entityname} Returns the name of the connected user's entity.
User workspace name {s:workspacename} Returns the name of the connected user's workspace. When a user cannot be identified (as in the case of a metric task, for example), a null value is returned.
User language {s:language} Returns the ISO-639-1 code representing the connected user's language. This code is specified in the language setup screen. When a user cannot be identified (as in the case of a metric task, for example), a null value is returned.
User language name {s:languagename} Returns the language name representing the connected user's language. This name is specified in the language setup screen. When a user cannot be identified (as in the case of a metric task, for example), a null value is returned.
User profile {s:profile}

Returns the connected user's profile.

0: Public user profile

1: User profile

2: Administrator profile

3: Super-administrator profile

When a user cannot be identified (as in the case of a metric task, for example), a null value is returned.

Related Links