Skip to main content
Solved

Pass current year from lobby element to lobby

  • March 27, 2026
  • 2 replies
  • 16 views

Forum|alt.badge.img+7

I thought this would be easy. I have a lobby element with a link to another lobby the contains metric data. I need to pass the current year to the lobby page parameter YEAR. I have tried

Hardcoding the year works

lobby/fd24bb55-7ae4-49d7-9f35-36104644be99?pageParams=YEAR:'2026'

This does not

lobby/fd24bb55-7ae4-49d7-9f35-36104644be99?pageParams=YEAR:'#NUMBER_OF_THIS_YEAR#'

I do not want to use a default value on the metric lobby page because the users will want to select other years on occasion. Any suggestions on how to do this?

Thanks

Best answer by Lingesan08

Hi ​@pshields ,

Why #NUMBER_OF_THIS_YEAR# doesn't work

IFS Cloud's CSV (Context Substitution Variable) support in lobby navigation is primarily limited to date-type fields Azurewebsites — things like #TODAY#, #START_OF_THIS_YEAR#, #END_OF_THIS_YEAR#, etc. There is no built-in CSV that returns just the year as an integer, which is what your YEAR page parameter (a number type) needs.

Recommended Workarounds

Option 1 — Add YEAR as a page parameter on the SOURCE lobby (cleanest solution)

Add a YEAR page parameter to the source (linking) lobby and give it a default value of the current year. Then pass it dynamically in your navigation link:

lobby/fd24bb55-7ae4-49d7-9f35-36104644be99?pageParams=YEAR:$YEAR$

Using pageParams maps the page parameters of the source lobby to the page parameters of the destination lobby. Ifs The $YEAR$ syntax references the source lobby's own page parameter value. This way:

  • The destination lobby opens defaulted to current year ✅
  • Users can still change the year on the destination lobby ✅
  • You're not hard-coding a default on the destination lobby ✅

Option 2 — Use a SQL datasource element to expose the year

Create a simple single-row SQL datasource on the source lobby with a column like:

sql

SELECT TO_CHAR(SYSDATE, 'YYYY') AS YEAR FROM DUAL
```

Then reference it in navigation using the element data value syntax:
```
lobby/fd24bb55-7ae4-49d7-9f35-36104644be99?pageParams=YEAR:$[YEAR]

The $[COLUMN_NAME] syntax includes data values of the lobby element itself Azurewebsites, so this pulls the computed year directly from the SQL result.

Option 3 — Use #START_OF_THIS_YEAR# if YEAR accepts dates

If your YEAR parameter can be redefined as a date type and your SQL uses EXTRACT(YEAR FROM ...), you could pass #START_OF_THIS_YEAR# — but this only helps if you're willing to rework the datasource on the destination lobby.

2 replies

Forum|alt.badge.img+7
  • Do Gooder (Partner)
  • Answer
  • April 2, 2026

Hi ​@pshields ,

Why #NUMBER_OF_THIS_YEAR# doesn't work

IFS Cloud's CSV (Context Substitution Variable) support in lobby navigation is primarily limited to date-type fields Azurewebsites — things like #TODAY#, #START_OF_THIS_YEAR#, #END_OF_THIS_YEAR#, etc. There is no built-in CSV that returns just the year as an integer, which is what your YEAR page parameter (a number type) needs.

Recommended Workarounds

Option 1 — Add YEAR as a page parameter on the SOURCE lobby (cleanest solution)

Add a YEAR page parameter to the source (linking) lobby and give it a default value of the current year. Then pass it dynamically in your navigation link:

lobby/fd24bb55-7ae4-49d7-9f35-36104644be99?pageParams=YEAR:$YEAR$

Using pageParams maps the page parameters of the source lobby to the page parameters of the destination lobby. Ifs The $YEAR$ syntax references the source lobby's own page parameter value. This way:

  • The destination lobby opens defaulted to current year ✅
  • Users can still change the year on the destination lobby ✅
  • You're not hard-coding a default on the destination lobby ✅

Option 2 — Use a SQL datasource element to expose the year

Create a simple single-row SQL datasource on the source lobby with a column like:

sql

SELECT TO_CHAR(SYSDATE, 'YYYY') AS YEAR FROM DUAL
```

Then reference it in navigation using the element data value syntax:
```
lobby/fd24bb55-7ae4-49d7-9f35-36104644be99?pageParams=YEAR:$[YEAR]

The $[COLUMN_NAME] syntax includes data values of the lobby element itself Azurewebsites, so this pulls the computed year directly from the SQL result.

Option 3 — Use #START_OF_THIS_YEAR# if YEAR accepts dates

If your YEAR parameter can be redefined as a date type and your SQL uses EXTRACT(YEAR FROM ...), you could pass #START_OF_THIS_YEAR# — but this only helps if you're willing to rework the datasource on the destination lobby.


Forum|alt.badge.img+7
  • Author
  • Do Gooder (Customer)
  • April 2, 2026

Thanks for the detailed answer. I have option 1 working but cannot figure out how to do option 2 and it seems like it might be useful if I can figure it out. In my attempt at option 2 I created a lobby datasource with a column TO_CHAR(SYSDATE, 'YYYY') named YEAR. I then used this datasource for the link list datasource but when I click on the link to go to the lobby is passes null as the year. What am I missing?