Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please suggest a way to create variables without calling generic objects API.
The expression only(Date) is meaningless in the script. It will evaluate to Null and that means the variable won't exist after the script is finished. Perhaps you want to create a variable in the script containing the expression Only(Date) and you want to use that in the front end. If so you need to use SET instead of LET: SET vSelectedDate = Only(Date);. You can then create a measure to use the variable: =$(vSelectedDate)
Create them in the Data load editor:
SET vMyVariable = 1;
Then reload the document.
Thanks Gysbert,
Can we use LET instead of SET in case when we have to first evaluate expression?
Yes, you can use LET too.
Dear Dinesh,
SET => Just assign value to the variable as a literal.
LET => First Evaluate the expression and then assign to variable.
Kind regards,
Ishfaque Ahmed
I got problem in using LET. I have described my problem in the image above, please help me.
The expression only(Date) is meaningless in the script. It will evaluate to Null and that means the variable won't exist after the script is finished. Perhaps you want to create a variable in the script containing the expression Only(Date) and you want to use that in the front end. If so you need to use SET instead of LET: SET vSelectedDate = Only(Date);. You can then create a measure to use the variable: =$(vSelectedDate)
Dear Gysbert,
Thanks for the reply. Can you please suggest an solution for the same.