dynamic formula filtered views

Posted by Rollbase User on 27-Dec-2012 14:29

I'm currently trying to create a view that dynamically filters which records are visible to the user depending on the company the view is being used for. Example: If jack wants to have informative emails tied to a particular company sent to a specific user, then a drop down list with the names of the users specifically tied to that company should be available to choose from. If jack then went into another company's settings and wanted to set up another user to receive emails, the same drop down should then only display users belonging to that company. My thought is that the drop down list should be populated by a view with all users, and then the users that show up when running should be filtered using a formula. Can this be done this way? What might the formula look like if so? The formulas I have been writing so far either error out, or populate all or none of the users without filtering them.

All Replies

Posted by Admin on 03-Jan-2013 12:14
If Company record has relationships with User records - you can use that relationship to filter available choices in picklist. Please check Chapter 2 for more info.
Posted by Admin on 20-Feb-2013 08:40
The Company Object and User Object already have a relationship with each other.



I'm currently using a lookup field from the company object page to look at a view in the user object. I'm having trouble finding a way to filter the view because it doesn't seem like the lookup sends any arguments to the view to make the users specific to the company the current user is in.
Posted by Admin on 20-Feb-2013 14:49
I have found the main and linked lookup options in the global properties for the lookup I want to use. How can I use them to narrow the results of the lookup on my company page to only show the users associated to that specific company?
Posted by Admin on 20-Feb-2013 16:35
If you company has relationship with Users - these Users will be shown in lookup field (or list view) on Company page. This is simple direct relationship.
Posted by Admin on 21-Feb-2013 08:00
Correct, but now I need to take that a step further. Right now, using the lookup field shows all users. I need to limit the users shown in the field to just those related to the company the current user is in.



Example: Company ABC has Users-Ted and Bill

Company XYZ has Users- Yang and Tom



When the current user is in company ABC and looking up Users in the lookup field, the users that show up should not be all users. The current user should only see Ted and Bill.



Same goes for if the current user is in Company XYZ. Only Yang and Tom should appear in the listing.



So right now I have all Users appearing, and I need to limit the ones selectable to just those related to the specific company.

This also needs to be dynamic so creating a hardcoded list for each company of the users specific to them would not be practical.
Posted by caylali on 05-Feb-2016 00:10

Is there a solution to this?

This thread is closed