A client of mine wants to pull employee names from a database based on a users input of the employee's ID number. The user will be entering the ID and the name of that employee should populate in a label or calculation field. Any suggestions or examples on how this can be done? I'm trying to have them go another route with using a people picker to then get the ID but want to get this done just in case.
Solved! Go to Solution.
Are you pulling data from a custom SQL DB or SharePoint User Profile DB?
For custom SQL DB, your best bet would be to write a custom web service that takes in the employee ID as input parameter and this web service will query your sql db for the employee name and return it as result. Then in your nintex form you need to have some jquery code to call that web service when user enter an employee ID number and populates the label/calctuion field as required.
If your employee ID already exists as an custom user profile field in your SharePoint User Profile, you should be able to use REST service along with some jquery code to get the employee name by ID. Some examples can be found here:
What version of Nintex Forms are you running - the reason I ask is if you are using Enterprise then something like Nintex Forms Enterprise - SQL Request Control should be of use.