I have created a Form Template which is published to a library and (using data connections) is connected to a staff directory list within my SharePoint site. When a form is opened the user name is populated using, concat(substring-before(userName(), "."), " ", substring-after(userName(), ".")) which pulls through the user's name as expected. I have then created "set a fields value" Rules in other fields in the form to complete Department, Line Manager and Job Title using the secondary connection to the staff directory.
When the form is opened (on any machine) only the user name is populated, the other fields remain blank. However, when I click the "Design this Form" button and then "Preview" the form I get a Microsoft InfoPath Security Notice, "...identified a security concern...form is using your identity to connect to data sources...Click Yes if you trust both locations...This form is located at C:\Users...This form will connect to data sources located at http://(servername)" When I click "Yes" all the information is populated in all the fields.
Any ideas how I can resolve this issue? I was hoping to use this layout in many forms so staff members dont need to complete this information every time they fill in a form! All staff have read access to the staff directory and contribute rights to the forms library.
Thank you in advance