We have created an HR form to report sickness which restricts the views by using 'User Roles' set to the manager's AccountID when submitted to Sharepoint. Upon submission the form also sends an email to the manager to inform of the absence.
When the employee returns to work, a second infopath form is populated from the information stored on Sharepoint using the details from the original form. We want to restrict views in the second infopath form to the managers identified in the first form. At present we are populating text fields with the name from the AccountID in Sharepoint but this does not set the User Roles hence the views are not set.
To control the view, is there a way to set the User Roles from a field which contains only the manager's name in the second form? The field is no longer an email address when submitted to sharepoint. Is there a way convert the text field to an email address to set the User Role to the manager's name? Ideally without using code.
We are using Infopath and Sharepoint 2010.
Thanks.