Geopointe

Using a User Merge Fields in Filters

Being able to filter by records you own (My Accounts or My Opportunities) is extremely useful. However, there are times that you need to see records you are connected to, but not the owner of. Perhaps you own the Account but not the Opportunity. Or, maybe you are attached to a record as a manager, but not the owner. For these cases, we have the ability to filter by a User Merge Fields. 
What is a Merge Field? If you're unfamiliar with the term, merge fields are dynamic values in Salesforce that change based on the person using it or the record you're starting from. For Geopointe's purposes, User Merge Fields read in information about the person currently using the map. It allows you create a data set that will be unique for every individual that uses it without having to hard code their name or details into the filters.
 

Using a Merge Field Filter

Create a new data set or navigate to the Edit Data Set screen. For this example we're going to do Accounts with Opportunities you own. This requires an Accounts Data Set and a Cross Object Filter to Opportunities.



Once selected, add an Opportunity filter. For this example, we are going to pick Opportunity > Owner > Full Name. since we are looking for the Opportunity Owner field. Once chosen, click Select


Once you're ready to enter the filter value, click on the {!User.field} link to the right of the text entry box.


You can filter by any field available here: User ID, Name, Profile, Division, Role, etc. come to mind as possible things you may want to filter by. In this case, we're just going to choose Full Name, just like we did for the filter itself.



Once inputted into the field selector, it will look like the screencap below. That is the syntax for writing a merge field. When ready, click Add FilterSave your data set and Close. You are ready to run the search!


The filter we just created will return All accounts with Opportunities that are owned by the current user of the data set.

Here are some other examples of uses for a User Merge Field Filter:

- Accounts whose Manager is the current user.
- Accounts whose assigned technician is the current user.
- Properties who are managed (but not owned) by the current user.
- All Accounts owned by someone in the same role as the current user.
- All leads assigned to someone with the same profile as the current user.
- All Opportunities assigned to someone in the same department as the current user.