I have Leave form that is created from InfoPath and Published it to SharePoint 2013 site. This leave form, the user/employee will enter the employee number then it will appear the employee's details.

Now my question is could it be possible to restrict the user(current logon) to create leave request of other employee?

Hope someone could help me. Thanks in advance

  • I am assuming the form is for the creating leave request for the current logged-in user. Your question is a little vague as it suggests one can only create request for other employees.
    – bkk
    Aug 16, 2016 at 6:55

3 Answers 3


I assume you have rules in place that get employee details based on the employee number.

You can set up a rule that gets the name of the current user and then compare that with the name of the employee whose number has been entered. If the names don't match, hide the Submit button on the form (don't use the ribbon to submit the form).

Here is a walk through for getting the current user's name in InfoPath: https://samsharepoint.wordpress.com/2013/04/30/infopath-get-the-current-user-without-writing-code/


I think yes you can do it.

On the Form Load you can query for the current user information(employee number and other details) and then on text box change event you can match the employee number entered by the user to the employe number you got from the query

If it does not match show them meesage or disbale submit button

To get current user information :Current User Information


Just make the requestor field (people picker control) in the InfoPath form read only and have only current user assigned to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.