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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
StevanJovetic10
Contributor III
Contributor III

IN clause at tSalesforceInput

Hi all,

i want to use an 'IN' clause in a salesforce input query, based on some data that i already have

I have a list of strings, created runtime based on a csv file, and i want to filter the query in a way that it takes only COLUMN IN (my list of strings) records.

Is it possible to do without using a join?

The problem is that the query as is right now extracts a lot of records and i want to avoid that.

Thanks,

Stevan

Labels (3)
1 Reply
Anonymous
Not applicable

@Fabrizio Meloni​ , yes, you can add a in cause in the Condition field of tSalesforceInput to filter the data, for example:

"Id in ("+context.in+")"

 

Read the list of value from csv file and build the in string, eg:

tFileInputDelimited--main(row1)--tJavaFlex

 

in the main code of tJavaFlex:

if(context.in.equals("")){

context.in="'"+row1.columnName+"'";

}else{

context.in=context.in+",'"+row1.columnName+"'";

}

 

//Define a context variable called in, string type and let the default value as empty.

 

 

Regards

Shong