function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CustomDataIntegrationsCustomDataIntegrations 

Trying to determine what is returned in a select based on field contents

I am trying to do a statement similar that would be written like this for SQL Server:

 

select case when Field1 = 'A' then 'B' else 'C' end as NewField from Accounts

 

How do I do this for Salesforce?  Basically, I want to make sure that a field that I am returning is not null, if it is, then I want to return an empty string.

Ankit AroraAnkit Arora

Not able to understand clearly but let me know if it help you:

 

1) Try Field1 != null (&& Field1 != '' )

 

2) Or Field1 = 'A'  OR Field1 = 'B'

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page