Skip to main content

Is there any way to match the currently logged in user to a list of names from a picker?

 

I have a list view and need to allow a certain group of employees read access to all submitted forms while locking this view down so that other employees can only see forms they've submitted. Is there any way to accomplish this?

 

The picker that I have set up with this list of employees is tied into an advanced smart object

Good Day Evandberry


 


I can see that the main goal here is to check if the logged in user exists in a specific SmartObject therefore the question that I have is... do you have to necessary validate using a picker control?


 


If not then the below should suffice for your request to check who the logged in user is and then validate if that user is contained in a specified SmartObjects data list.


 


For this the initialize rule would need to be used as it is the rule that gets executed first when the viewform is executed. On the initialize rule the logged in user would need to be returned useing a "Transfer Data" rule then that returned value would need to be used to check if the user can be found in a specific SmartObject - this can be done by using the "Execute a SmartObject Metod" Rule. Afterwards an "Unbound" rule would need to be created which needs to compare the result to each other in order to either allow the logge in user to proceed or disallow them from proceeding.


 


Please see the rule cofiguration screenshot below:



 


The result of this rule constuction would be as follows, expand below to see the screenshot results:


When User Does Not Exist in specified SmartObejct:


*Additional Note: You can also hide the "Validation Result" controls should you not want to see them on your viewform, the rule executions shoudl still work as above. 


 


Kind Regards


Raymond


 


That did it. I modified it so that if the advanced condition was false, then I had a filter run. But your post put me on the right path. 

 

Thank you


Reply