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

Validating many coditions using NOT

I would like to build a query where i can combine the follwoing three in to on query that is used for  record types prospect and member. any advice?

(RecordType.Name = "Prospect"),
ISBLANK( PersonMailingCity),
ISBLANK( PersonMailingStreet ),
ISBLANK( PersonMailingPostalCode )),
(NOT($User.BypassVR__c) && 
NOT( OR( ISBLANK(Phone ), REGEX( Phone ,"(\\D?[0-9]{3}\\D?)[\\s][0-9]{3}-[0-9]{4}"))))
NOT($User.BypassVR__c) && ($RecordType.Name = "Member" || $RecordType.Name = "Prospect") && ISBLANK( FirstName)
Hi Smitha,

You might try putting this in a formula field in the object with return type as boolean. And the query becomes straight forward, where you just check for the formula field to be true.

Hope it helps