Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to convert my expression to a variable. I plan to use this variable in NPrinting dynamic report names.
The below script gives me what i want, the only problem is that DateField has to be in 'YYYYMM' format.
LET vNprinting = '=max({<FIELD1={'XXXXXXX'}, FIELD2={'xxxxxxxx'}>}total DateField)'
I tried this way but it didnt work:
LET vNPrinting = '=date(date#(max({<FIELD1={'XXXXXXX'}, FIELD2={'xxxxxxxx'}>}total DateField),'YYYY-MM-DD'),'YYYYMM')'
This should work.
Might be there is problem with the format which you are providing in "total DateField".
try removing Date# you might get result.
If not share a screenshot of the fields you are using.
Hi @askarkhan ,
I guess that the brackets causing the problem...
I cant use my expression in a variable without "" brackets....
This expression works in my table:
=date(date#(max({<FIELD1={'XXXXXXX'}, FIELD2={'xxxxxxxx'}>}total DateField),'YYYY-MM-DD'),'YYYYMM')'
But I cant use it in a variable, so when I change the type of the brackets, it doesnt work:
LET vNPrinting = '=date(date#(max({<FIELD1={"XXXXXXX"}, FIELD2={"xxxxxxxx"}>}total DateField),"YYYY-MM-DD"),"YYYYMM")'