forcedotcom / soql-tooling

SOQL Language Tooling features including the Language Server and Query Builder UI.
BSD 3-Clause "New" or "Revised" License
22 stars 8 forks source link

SOQL Builder: Support NULL checks and/or empty string #268

Closed djs5008 closed 3 months ago

djs5008 commented 1 year ago

Summary

I am trying to create a query using the SOQL builder in VSCode and I cannot find a way to filter by null values.

If I try to write null or NULL, it tells me that I need to enclose it in single quotes.

image

If I try to write '' (empty string), it puts the value in the query as '\'\''

image

None of the operators seem to indicate is null, either.

image

Steps To Reproduce:

  1. Open the SOQL Builder
  2. Set the From, Fields, Order By, etc.
  3. Add a filter, try to add null as the value in the box.

Expected result

I would expect to either have an is null/is not null operator, or allow to set the value to null in the filter value section.

Actual result

I am not able to filter results by null values.

Salesforce Extension Version in VS Code: v57.7.0

SFDX CLI Version: sfdx-cli/7.194.1 darwin-x64 node-v18.13.0

OS and version: macOS 13.2.1

simonds commented 3 months ago

Is there another issue that is related to this that IS being worked on? This is a very important feature to have for performing SOQL queries. I'm shocked that it still isn't supported in the extension.

jonnyhork commented 3 months ago

@simonds Thanks for bringing this to our attention again, @djs5008 sorry for the delay, this slipped through the cracks!

We are working on a fix for this now, I'll update this issue with progress soon.

Until the bug is addressed there is a workaround where you can edit the source query as text with the WHERE statement to filter by NULL

FIlter by null

jonnyhork commented 3 months ago

@djs5008 @simonds Thanks for your patience here, happy to say this should be fixed in version 61.1.2 of the SF extensions. Please let me know if there are any issues, I am going to close this issue.