Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
StephenDunn
Contributor III
Contributor III

Using a variable fieldname in a Filter List block

Hi,

in a Qlik Cloud automation, within a filter block, I need to use a variable as the fieldname.

How would this look in the If statement?

Without a variable, the name is stated like:   'Required Fieldname'

I've tried replacing that with various options (after toggling the parsing option to allow JSON input) :-

  '{ $.requiredFieldName }'

  { $.requiredFieldName }

  =''{ $.requiredFieldName }'

  '={ $.requiredFieldName }'

and similar, but nothing I've tried is working.

Thank you.

 

Labels (2)
1 Reply
tamara48wells
Contributor
Contributor

You can't use a variable as the field name inside the filter block in Qlik Cloud automations. Field names must be literal strings. The solution is to set up your automation so that the variable resolves before the filter. Then, give the resolved value to the filter expression. This means that in practice, you will need to use the variable's value in the condition (for example, `{{ $.requiredFieldName }}`) instead of trying to change the field name itself. nicview net