+ Start a Discussion
Durgamba RayuduDurgamba Rayudu 

Logged in users name

Hi,
I need to create a view to filter data with condition primary contact on opportunity is equal to Logged in user. is it possible to do without creatign formula filed?

 
Andrew GAndrew G
Short answer - no.

For example, you cannot use the $User.LastName or similar features in your list view filters.

Only way I can think to do it (simply) is to use the formula field , something like 
 
IF(  
  AND(
    FirstName = $User.FirstName,
    LastName  = $User.LastName
  ),
  "Yes", 
  "No"
)

Then set a filter in the list view where the field equals "Yes"

You could try playing with visualforce pages and setting the controller in the back end to query based on Current User and filtering against name fields, but it seems a lot of excess work when you could use just the formula field.

Regards

Andrew