Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sspe
Creator II
Creator II

Problem when loading variable from script

Hi,

I'm having a problem when I load a variable from my script.

I'd like to create a variable like below -

Set gvMonthID = Only({1<[Date_Key] = {"$(=Date(Today(),'YYYY-MM-DD'))"}>} MonthID);

It actually load fine without any problems, but in my application it appears as : Only({1<[Date_Key] = {""}>} MonthID)

I simply can't figure out how to prevent it from resolving the $(=Date(Today(),'YYYY-MM-DD')) part when loading, but still include the '$' so it will be resolved in my application. It's most likely very simply and obvious, but I just can't get it right.

Regards

Steen

3 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

Try :

Set gvMonthID = Only({1<[Date_Key] = {"%(=Date(Today(),'YYYY-MM-DD'))"}>} MonthID);

Let gvMonthID = replace('$(gvMonthID)', '%', '$');

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
m_woolf
Master II
Master II

The apostrophes in your script will cause a problem. You may try replacing them with & chr(39) &

sspe
Creator II
Creator II
Author

Hi Aurelien,

Thanks for the help. That seems to do the trick. Of course it's a little annoying that I have to do that extra line of code for variables containing a $ sign expansion, but I can live with that.

Regards

Steen