Skip to main content
Solved

Input Box (Date) - How to use the output?

  • September 6, 2023
  • 2 replies
  • 37 views

Hi everyone,

 

I want to use an input box in a view so users can filter a specific table using a runtime variable. When using the input box and setting it to type date, the output is something like 1694728800000. This is saved in a runtime variable, which I am using in a filter for that specific table. However, I couldn't find a way to make the formular work.

 

Example formular: FILTER EKPO.AEDAT = ${{runtime_variable}}

 

where ${{runtime_variable}} is 1694728800000.

 

Maybe someone can help out with the correct conversion to make use of the date from the input box.

 

Best regards

Aram

Best answer by abhishek.chatu14

What you are missing is {t 1694728800000}, refer to the following for more details

 

https://www.celopeers.com/s/question/0D50700002krk4cCAA/what-does-t-946771200000-refer-to-what-is-returned-as-op-for-the-above-part-in-the-pql-statement-case-when-table1column1-in-t-946771200000-t-1009756800000-t-1245145600000-then-table1column1-else-null-end?language=en_US

 

It is not very clear from you question if you have figured out the runtime variable and input box bit but assuming you have try the following

 

FILTER EKPO.AEDAT = {t ${{runtime_variable}} };

 

Hope this helps!

2 replies

abhishek.chatu14
Level 11
Forum|alt.badge.img+4
  • Level 11
  • 336 replies
  • Answer
  • September 8, 2023

What you are missing is {t 1694728800000}, refer to the following for more details

 

https://www.celopeers.com/s/question/0D50700002krk4cCAA/what-does-t-946771200000-refer-to-what-is-returned-as-op-for-the-above-part-in-the-pql-statement-case-when-table1column1-in-t-946771200000-t-1009756800000-t-1245145600000-then-table1column1-else-null-end?language=en_US

 

It is not very clear from you question if you have figured out the runtime variable and input box bit but assuming you have try the following

 

FILTER EKPO.AEDAT = {t ${{runtime_variable}} };

 

Hope this helps!


  • Author
  • Level 2
  • 2 replies
  • September 11, 2023

Worked perfectly, thank you!

 

Any idea how I could now show the selected date as a headline in a view?

 

TO_STRING( {t ${{runtime_variable}} }, FORMAT ( '%d.%m.%Y ' ) )

 

I tried this in a variable in the KM but got an error when referencing that variable in the view. And for a variable in the view itself I just get the plain text without the proper calculation.