<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Find in an expression the fields/dimensions/variables used? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Find-in-an-expression-the-fields-dimensions-variables-used/m-p/2059697#M18400</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;how to find in an expression the fields/dimensions etc ... used?&lt;/P&gt;
&lt;P&gt;For example if I have the following expression&lt;/P&gt;
&lt;P&gt;If(my_var = 0, my_field_1, my_field_2)&lt;/P&gt;
&lt;P&gt;I want to know that this expression contains one variable (my_var) and two fields (my_field_1, my_field_2).&lt;/P&gt;
&lt;P&gt;Is it possible to do this with qlick sense engine api (without necessarily using regexp) ?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2023 15:51:15 GMT</pubDate>
    <dc:creator>sama007</dc:creator>
    <dc:date>2023-04-12T15:51:15Z</dc:date>
    <item>
      <title>Find in an expression the fields/dimensions/variables used?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Find-in-an-expression-the-fields-dimensions-variables-used/m-p/2059697#M18400</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;how to find in an expression the fields/dimensions etc ... used?&lt;/P&gt;
&lt;P&gt;For example if I have the following expression&lt;/P&gt;
&lt;P&gt;If(my_var = 0, my_field_1, my_field_2)&lt;/P&gt;
&lt;P&gt;I want to know that this expression contains one variable (my_var) and two fields (my_field_1, my_field_2).&lt;/P&gt;
&lt;P&gt;Is it possible to do this with qlick sense engine api (without necessarily using regexp) ?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 15:51:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Find-in-an-expression-the-fields-dimensions-variables-used/m-p/2059697#M18400</guid>
      <dc:creator>sama007</dc:creator>
      <dc:date>2023-04-12T15:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Find in an expression the fields/dimensions/variables used?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Find-in-an-expression-the-fields-dimensions-variables-used/m-p/2060859#M18419</link>
      <description>&lt;P&gt;You can use the&lt;EM&gt;&amp;nbsp;GetFieldsFromExpression&amp;nbsp;&lt;/EM&gt;method to get the field names from an expression. I am not aware of a way to get the variable names, however if I was doing something like this I would use the&amp;nbsp;&lt;EM&gt;CreateSessionObject&amp;nbsp;&lt;/EM&gt;with the following parameters:&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    {
      qInfo: {
        qType: 'VariableList',
      },
      qVariableListDef: {
        qType: 'variable',
        qShowReserved: false,
        qShowConfig: false,
      },
    }&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;and then use &lt;EM&gt;GetLayout&amp;nbsp; &lt;/EM&gt;on the resulting session object&amp;nbsp;to get a list of all the variables in your app which could then be used with some sort of regex function to figure out which variables are being used in the expression.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 08:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Find-in-an-expression-the-fields-dimensions-variables-used/m-p/2060859#M18419</guid>
      <dc:creator>ckg</dc:creator>
      <dc:date>2023-04-17T08:39:15Z</dc:date>
    </item>
  </channel>
</rss>

