Searching a Data Extension in Salesforce Marketing Cloud with a Non Primary Key Value
Contact Builder has a search functionality that lets you find records matching your search criteria. However, this is limited to fields which have been set as Primary Key only. This begs the question…
What if you needed to search a data extension but only have data or a value that is not for the DE’s Primary Key?
Option 1 — Download the data extension and view as a spreadsheet. If the file size exceeds 20MB, you must use the FTP option. Then, you need to log into the FTP, and download it from there. Too much effort!
Option 2 — Use Query Studio (download from the app exchange) to write a basic query to return the Primary Key value of the corresponding record that you want to search. Then, take the Primary Key value and use this in the Contact Builder interface to search the data extension.
This trick can be super handy when used in conjunction with Sync DEs from CRM. Have a FirstName but need the ContactID? Have a Loyalty_Card_Number but need AccountID? Query Studio can be a quick time saver.
Let me know in the comments if you’ve tried this workflow!