Forum Discussion
Mmaria
9 years agoNew Member
Set parameter = DateTime.LocalNow()
Hello! Is there any way to set a parameter as a function? I want to set a parameter as today like this: DateTime.LocalNow(). As a default I want it to be today's date but I also want to be able...
bengineer
4 years agoNew Member
Create your paramenter and then right click it on the right under your queries and select 'Advanced Editor'. You can then put in a function. In my case, I needed it as text so I used the following-
--------------------------------------
let
Source = let
Source1 = DateTime.ToText(DateTime.LocalNow())
in
Source1
meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
in
Source
powerEDCE
4 years agoFrequent Visitor
But...with this the parameter is transformed into a query?