Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Passing Variable via TriggerEDXTask

Hi All,

I'm currently working on a console application with needs to pass a parameter to a Reload Task.

The parameter is the the filename, which needs to be loaded in the qvw.

in the qvw load script i've defined the variable as following:

Let vFileName;

//LET vFileName = "fileName.csv"

Load *

FROM ${vFileName}

(txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 1 lines);

If the vFileName variable is define hardcoded, it works just fine.

But I would like to pass this variable via the TriggerEDXTask

I've set up my C# code as following:

List<string> parameterList = new List<string>;

parameterList.add("fileName.csv");

Client.TriggerEDXTask (new GUID(), 'Reload Base Document', "ReloadPassword", "vFileName", parameterList);

But without succes, anybody has any idea on the solution?

1 Solution

Accepted Solutions
Not applicable
Author

OK I just found the solution

In the qvw you need the define the variable to it self

Let vFileName =TRIM(${vFileName});

Which seems like a bit of a dumb thing to do, but it works 🙂

View solution in original post

8 Replies
Not applicable
Author

OK I just found the solution

In the qvw you need the define the variable to it self

Let vFileName =TRIM(${vFileName});

Which seems like a bit of a dumb thing to do, but it works 🙂

Not applicable
Author

Hi,

I am having a similar situation, where in i want to reload my QV document with a variable value using the EDX trigger.

Can you provide the steps involved in creating the task in EDX for the above functionality?

Thanks in Advance.

M.Santosh Kumari.

Not applicable
Author

Hi Santosh,

You will need to configure it in 3 places:

The QlikView document,

The task in QlikView Management Console,

Your code, which call the EDX task.

in my example, i'm passing the input file name via an edx trigger to the QlikView document to load that file.

In the QlikView document, I created a variable in the load script which is set to it's self and later on used in in load statements. My variable is call vFileName

Let vFileName =TRIM(${vFileName});

In the QlikView Management Console, create a task, linked to your QlikView document.

We'll call it reloadQlikView,

Under the tab Triggers, add a trigger: "Triggered by an external event" and choose a password "ReloadPassword"

Ok and now for you code.

In the code you call the QlikView api with, a method excists called TriggerEDXTask

Call it as such, the parameterlist is a List with all your variable values which need to be passed to the task. For each value, the task will be run.

TriggerEDXTask (new GUID(), 'reloadQlikView', "ReloadPassword", "vFileName", parameterList);

I hope this all clear to you.

If you have any questions, feel free to contact me.

Kind Regards,

Malik

Not applicable
Author

Hi Malik,

Thanks for the reply.

I have done all the above steps. But i am facing problem with the WSHttpBinding in my Web.Config. We are not able to use the BasicHttpBinding as our QV server is on Secured certificated environment. So we are using the WSHttpBinding as below :

<bindings>

      <wsHttpBinding>

        <binding name="WSHttpBinding_IQMS" closeTimeout="00:01:00" openTimeout="00:01:00"

          receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"

          transactionFlow="false" hostNameComparisonMode="StrongWildcard"

          maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"

          textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">

          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

            maxBytesPerRead="4096" maxNameTableCharCount="16384" />

          <reliableSession ordered="true" inactivityTimeout="00:10:00"

            enabled="false" />

          <security mode="Transport">

            <!--<transport clientCredentialType="Ntlm" proxyCredentialType="None" realm=""/>-->

            <transport clientCredentialType="Certificate" proxyCredentialType="None"

              realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default"/><!--

            <message clientCredentialType="Windows" negotiateServiceCredential="true" />-->

          </security>

        </binding>

        <binding name="WSHttpBinding_IQTService" closeTimeout="00:01:00"

          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"

          bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"

          maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"

          textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">

          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

            maxBytesPerRead="4096" maxNameTableCharCount="16384" />

          <reliableSession ordered="true" inactivityTimeout="00:10:00"

            enabled="false" />

          <security mode="Transport">

           <transport clientCredentialType="Certificate" proxyCredentialType="None"

              realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default"/>

            <!--  <transport clientCredentialType="Ntlm" proxyCredentialType="None" realm=""/><message clientCredentialType="Windows" negotiateServiceCredential="true" />-->

          </security>

        </binding>

      </wsHttpBinding>

    </bindings>

    <client>

      <endpoint address="https://server:4799/QMS/Service" binding="wsHttpBinding" behaviorConfiguration="ServiceKeyEndpointBehavior"

        bindingConfiguration="WSHttpBinding_IQMS" contract="QMSBackendService.IQMS"

        name="WSHttpBinding_IQMS" />

      <endpoint address="https://server:4799/ANY/Service" binding="wsHttpBinding" behaviorConfiguration="ServiceKeyEndpointBehavior"

        bindingConfiguration="WSHttpBinding_IQTService" contract="QMSBackendService.IQTService"

        name="WSHttpBinding_IQTService" />

    </client>

and are facing the below problem :

error.png

Do you have any idea on this.

Thanks in Advance,

M.Santosh Kumari

Not applicable
Author

Sorry can't really help you out on that one.

Kind Regards,

Malik

Not applicable
Author

ok No problem.

Thanks for your help in EDX functionality.

Regards,

M.Santosh Kumari

Not applicable
Author

Hi Malik,

I have a similar requirement wherein i need to create an EDX Triggers which should accept a parameter and reload the dashboard.

The Trigger is working fine(refreshing the data by reloading the dashboard) but the data is not populating based on the parameter.

For Ex: I have a value ID as 2 which i should pass to the Edit Script and reload the dashboard by executing the stored procedures which accepts this ID as the parameter.

Can you please share a sample/ code for performing the above.

Thanks

Sai Krishna

Not applicable
Author

Hi,

The above post is really helpful. I was able to pass the parameter and reload the dashboard. In your example we can pass more than one parameter but for the same vaiable and it executes for all the values. But can we we have more than 1 parameter ( vfileName, and an other one) . Like i am using two variables in my stored procedures which i need to pass from the API. One for ID and other for name. So Can i pass both the ID and name from the API and access the same in the QV file Edit Script?

It would be great if you could help us on this.

Thanks in Advance,

M.Santosh Kumari