Hi Petter and thanks for the feedbackk, unfortunately it doesn't work, I'm consistently getting the same behavior in any expression I try with $(=...).
If used in the binary sentence, a "file not found" error pops up, and the filename is just as if the $(=...) returned empty string, see:
My original expression had the same behavior.
I've tried putting it into a variable like so:
set x = BINARY_QM_$(=Year(Today())*100 + month(Today())).qvw;
It does not work either, in the debugging trace is shows that the dollar sign evaluates to blank:
set x = BINARY_QM_.qvw
Whereas if i put in a Text Box in a sheet, the same expression:
='BINARY_QM_$(=Year(Today())*100 + month(Today())).qvw'
I get the expected result:
Did I miss anything and the $(=...) expansion does NOT work on the script? If so... how can I achieve a binary load from dynamic filenames?
Very nice trick / workaround Massimo!
I elaborated on your idea, since having the binary load on an external INC file was not a very secure strategy (a missing or deleted file would result in a unsecure UX document)
What I finally did is:
a) The DATA_YYYYMM.qvw creates, on its own reloading, the a1.inc file. (using Massimo's code)
b) On the hidden script of the UX, i'm doing a BINARY Data_$(=Must_include=a1.inc). That way if the file is wrong it just won't load at all, keeping security at bay.