Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
anmagrEMobG
Contributor II
Contributor II

Automation Create or Update Dimension - Error Loading a Description as expression

Hello,

I am using the "Create or Update Dimension" block to define Master Dimensions in my application in Qlik. The descriptions of my dimensions are defined as expressions (e.g. only({<_IDDimension = {'BrandName'}, Language = {'$(vSelectedLanguage)'}>} _DimensionText)). They load correctly, but then they are not "evaluated as expressions" from the starters, but are treated as a line of text (screenshot no 1). In the automation tried to put a "=" sign in front of the descriptions, but this doesn't seem to work. It does work though when I enter the edition of a dimension on the level of the Qlik app, save it (screenshot no 2) and get back to visualizing it (screenshot no 3).

Is there some workaround to force qlik to treat description as an expression and not as a text from the beginning?

Regards,
Antoni


Screenshot 1

anmagrEMobG_0-1699016611625.png

 

Screenshot 2

anmagrEMobG_1-1699016620175.png

 

 

Screenshot 3

anmagrEMobG_2-1699016628749.png

 

 

 

4 Replies
AfeefaTk
Support
Support

Hi @anmagrEMobG 

Sorry for the delay in response.

Could you please share the automation json file for us to investigate the issue further?

Follow the instructions here to download the automation.

Thanks

anmagrEMobG
Contributor II
Contributor II
Author

Hello AfeefaTk,

In the meantime I have developed a workaround that results in that this expression is evaluated and transferred to desired text within an excel sheet. 

In order to give you the full context, I would need to share 

The problem results from the fact that for the "Create or update Dimension"/"Create or update Measure" block assigns the description field value to { $.getMeasure.qMetaDef.description } which is fine if the description is a plain string. If in Qlik the description is defined as an expression ("fx" as in the screenshot 2 from the last post switches from gray to orange) than in json it is no longer addressed as { $.getMeasure.qMetaDef.description } it starts being addressed as {$.getMeasure.qMeasure.descriptionExpression.qStringExpression.qExpr}.

As the "Create or update Dimension"/"Create or update Measure" block assigns the description field value to { $.getMeasure.qMetaDef.description }, Qlik doesn't see it as an expression and shows it directly instead of evaluating it (the "fx" stays gray).

I share an automation that I need it for. It consists of two loops that in the final scope are two separate automations. The first one is an import of master measures from a Qlik app to a google sheet that I'd like to modify them in. Supposedly a user can modify them in a google sheet and then export them back to Qlik. Have a look into the part when the Variable "CheckDescription" is defined.

Would it be possible to address the description expression directly to  {$.getMeasure.qMeasure.descriptionExpression.qStringExpression.qExpr}?

This post might rather turn out to be a suggestion to include a possibility to define if a description will be an expression or not.

 

AfeefaTk
Support
Support

Hi @anmagrEMobG 

I am not able to reproduce the issue.
I can pass expression in the description field and it gets treated as an expression only in the UI, the only thing is I need to put the '=' sign before the expression.

Could you please send me the automation run history for the specific run where the description didn't get treated as an expression when an expression was inputted?

Steps to export run history can be found here (Section:Export This Run Button in Automations Overview Tab)

TH=

MaciekA
Partner - Contributor III
Partner - Contributor III

Hi @AfeefaTk & @anmagrEMobG,

I have the same issue, which is a bit annoying. I just created a list of 200 measures, which I'm loading via the automation and using the "Create or update Measure" block. Some of the measures are based on the other loaded measures. The problem is that the dependent measures don't work until I physically go to the base measures and open and save them. After that, all the dependent measures start to work. All my expressions start with the "=" sign. 

@anmagrEMobG, can you please explain how your workaround works? I can see that you are using the "CheckDescription" variable and setting its value first from the "Description" or from the "Description Expression". But it all seems to be focusing on exporting measures, not putting the expression in the right place to be properly evaluated. 

Thanks & Regards.