Hello @GoodDataTeam I am trying to create the vari...
# gooddata-platform
g
Hello @GoodDataTeam I am trying to create the variable using API but it gives error called I am referring this document : https://help.gooddata.com/api#/reference/dashboards-and-reporting/create-a-variable/create-a-variable Can you please tell me what is wrong in this?
z
Hi, it seems like the expression isn't filled in. Can you fill it and try again?
g
I have tried with expression as well but still it not works, it gives error - once level defined cannot change. If I removed level from input parameter then it ask for level parameter. And also one more question How can I check my variable expression is correct?
i
Hi, You can access the Attribute object that your Variable is based on via gray pages and select the element manually. More info about gray pages can be found here: https://help.gooddata.com/doc/enterprise/en/workspace-and-user-administration/adminis[…]-and-workspace-objects/access-the-gray-pages-for-a-workspace This is the example of such expression:
Copy code
expression": "[/gdc/md/obv8xyny3dygpb10t2rpai4tjw5nfcif/obj/11] IN ([/gdc/md/obv8xyny3dygpb10t2rpai4tjw5nfcif/obj/11/elements?id=5], [/gdc/md/obv8xyny3dygpb10t2rpai4tjw5nfcif/obj/11/elements?id=3], [/gdc/md/obv8xyny3dygpb10t2rpai4tjw5nfcif/obj/11/elements?id=7])"
g
ok, thanks@Ivana Gasparekova I will check
i
Fingers crossed for you! Each Attribute value has its unique ElementId. Some hints could be found in the article below as well: https://help.gooddata.com/doc/free/en/workspace-and-user-administration/managing-work[…]ta-access/manage-attributes/determine-the-attribute-value-id