Parameter syntax error

Hi,

I was trying to create a parameter and when I use it in the calculated field for the controls then it is throwing an error saying -

"The syntax of the calculated field expression is incorrect. Correct the syntax and choose create again. "

Here is the syntax I have used

ifelse(
${GranularityLevel1} = “Field 1”, {field_1},
${GranularityLevel1} = “Field 2”, {field_2},
${GranularityLevel1} = “Region”, {region}, NULL)

I have created a single value parameter and applied controls as
Field 1
Field 2
Region

I think it is related to string as I use numbers in my controls but not sure how to fix it. Can you please help with it? Thank you.

@Lasya ,

Can you share a few screenshots of where you are facing the issue ? if it’s easier, you can create a sample of the same in arena

Kind regards,
Koushik

Attached are the screenshots and I see the below error message while creating the parameter -

"The syntax of the calculated field expression is incorrect. Correct the syntax and choose create again. "

I was able to fix this issue. The else ‘Null’ was the issue. For some reason, the ifelse statement was not accepting null and I updated that to a column name and it got fixed. Thanks for the help.