Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to query Salesforce records based on non-null field?

AdrianWSH
7 - Meteor

What is the WHERE clause to use to pull in records that have a field value of null or if they're empty essentially.

 

I have tried:

 

field_name != null

field_name != ''

 

They error out with an error code of "400: Bad Request".

2 REPLIES 2
Treyson
13 - Pulsar
13 - Pulsar

Hello @AdrianWSH ,

 

Which version of the API are you using? There is a bulk rest API and a SOAP API. I was looking through the documentation (HERE) and it looks like you have to pass it in after you have gotten back your auth token. 

 

The example below looks like it's leveraging the SOQL function to return exactly what you would want.

 

params[0] = new NameValuePair("q","SELECT name, title FROM Contact LIMIT 100");
gm.setQueryString(params);

Treyson Marks
Senior Analytics Engineer
AdrianWSH
7 - Meteor

@Treyson 

 

I meant to write that I wanted to pull in non-null records, my bad.

 

I'm using the Salesforce Input connector, so I'm not actually entering a auth token manually and it's all done behind the scenes inside the connector. Would you be able to help me with this new information?

Labels