You need to sign in to do that
Don't have an account?

SOQL query or report
I want to query those record which have only specific type of picklist value.
Example: suppose we have an object called Company and in this company we have a record SF, AB, DC.
SF has picklist value x
AB has picklist value x,y
DC has picklist value x there are many record like this....
and some reord has not picklist value.
so i want to query only those record which has picklist value only x. Can anyone help on this.
Example: suppose we have an object called Company and in this company we have a record SF, AB, DC.
SF has picklist value x
AB has picklist value x,y
DC has picklist value x there are many record like this....
and some reord has not picklist value.
so i want to query only those record which has picklist value only x. Can anyone help on this.
Please use Excludes filter on both your report and SOQL for your requirement. For example, I am considering to fetch all the Accounts (Parent records) whose contacts (child records) are having picklist value only 'X' but not any other picklist values like Y or Z. Your Report filter should have filters like below which will only fetch record SF in your case:
SOQL for fetching all the Account records based on the picklist value on contact object will be like below:
Hope this helps! Please mark as best if it solves your issue
Thanks
All Answers
I think you can apply the file wherein you can mention the condition that if the value of the picklist is 'x' only then retrieve the record.
>> You could do something like this: select id from lead where status='open'
Here the status is the picklist and open is the value.
I hope this helps and in case if this came in handy can you please choose this answer as the best answer so that it can be used by others in the future.
Regards,
Anutej
Please use Excludes filter on both your report and SOQL for your requirement. For example, I am considering to fetch all the Accounts (Parent records) whose contacts (child records) are having picklist value only 'X' but not any other picklist values like Y or Z. Your Report filter should have filters like below which will only fetch record SF in your case:
SOQL for fetching all the Account records based on the picklist value on contact object will be like below:
Hope this helps! Please mark as best if it solves your issue
Thanks