Others

How to Create a Form That Retrieves Employee Details by ID

Tauseeq MagsiTauseeq Magsi Oct 16, 2026 868 views

Question details

The user wants to create a dynamic form that automatically fills in employee information, such as name and position, immediately after an employee ID is entered.

How to Create a Form That Retrieves Employee Details by ID
Product
Microsoft Forms and Power Apps
Device & OS
not provided
Scenario
Creating an internal data-entry or lookup tool for HR or business operations where entering a unique identifier pulls related records.
Observed behavior
The user needs dynamic data retrieval based on input, but standard static form tools do not support live data population during form completion.
Before you start

Ensure you have access to Microsoft Power Apps and that your employee records are stored in a supported cloud data source, such as a SharePoint list or an Excel table hosted on OneDrive.

Solution 1Recommended

Use Microsoft Power Apps to Create a Dynamic Lookup Form

Since Microsoft Forms cannot dynamically populate fields during completion, building a canvas app in Power Apps is the best approach to retrieve real-time data.

Microsoft Forms is designed strictly for static surveys and quizzes, meaning it cannot pull live data from an external database while a user is typing. Power Apps solves this by connecting directly to live data sources like Excel, SharePoint, or Dataverse to perform dynamic lookups instantly.

1
Prepare your data source

Create an Excel file containing columns for Employee ID, Name, and Position. Format this data as a Table (Insert > Table) and save the file to SharePoint or OneDrive for Business.

2
Create a new Canvas App

Open Microsoft Power Apps, select 'Create', and choose 'Blank app'. Select 'Blank canvas app' and give your application a name.

3
Connect to your data

In the left-hand menu, click the 'Data' icon, select 'Add data', and search for the connector where your Excel file is stored (e.g., OneDrive for Business or SharePoint). Select your file and the specific table inside it.

4
Design the input fields

Go to the 'Insert' tab and add a 'Text input' control. This is where users will type the Employee ID. Clear its default text and name the control 'txtEmployeeID'.

5
Configure the dynamic lookup

Insert a 'Text label' control to display the Employee Name. In the formula bar for its 'Text' property, use the LookUp function: LookUp(YourTableName, EmployeeIDColumn = txtEmployeeID.Text, EmployeeNameColumn).

Use Microsoft Power Apps to Create a Dynamic Lookup Form
Formula Customization: You can repeat the final step for as many fields as you need (like Position, Department, or Email) simply by changing the target column name at the end of the LookUp formula.
Powerful Data Retrieval in Spreadsheets

Create an Auto-Populating Form in WPS Spreadsheet

If you do not need a standalone web application, you can easily build an interactive form layout directly within WPS Spreadsheet using the VLOOKUP function to automatically retrieve employee details instantly.

  1. 1. Set Up Your Database Sheet: Open WPS Spreadsheet and create a sheet named 'Database'. Enter your employee data with dedicated columns for ID, Name, and Position.
  2. 2. Design the Form Layout: Create a second sheet named 'Form'. Designate specific cells for user input (e.g., cell C3 for the Employee ID) and output fields (e.g., C5 for Name, C7 for Position).
  3. 3. Apply the VLOOKUP Function: Click on the output cell for the Employee Name (C5) and enter the formula: =VLOOKUP(C3, Database!A:C, 2, FALSE).
  4. 4. Retrieve Additional Details: Click on the output cell for Position (C7) and enter the formula: =VLOOKUP(C3, Database!A:C, 3, FALSE). Now, typing an ID in C3 instantly populates the rest of the form.
Easily manage employee data with built-in VLOOKUP and XLOOKUP functions without complex coding.Highly compatible with Microsoft Excel (.xlsx) formats for seamless file sharing.Design custom form layouts directly in the spreadsheet interface.Free, lightweight, and fast alternative to complex app builders.
QA img-9

Frequently Asked Questions

Can I use Microsoft Forms to auto-populate employee names?

No, Microsoft Forms is a static data collection tool. It does not support dynamic field population or live database lookups during form completion. You must use Power Apps or a spreadsheet-based solution.

What function do I use to retrieve data in a spreadsheet form?

The VLOOKUP, HLOOKUP, or XLOOKUP functions are ideal for this task. They allow you to search for a specific identifier, such as an Employee ID, and return related information from another column in your dataset.

Where should I store my employee data for Power Apps?

To ensure seamless connectivity, you should store your employee data in a cloud-based source such as a SharePoint List, Microsoft Dataverse, or an Excel table hosted on SharePoint or OneDrive for Business.

Is it possible to protect my spreadsheet form from accidental edits?

Yes. In WPS Spreadsheet, you can unlock only the input cells (like the ID field) via 'Format Cells' > 'Protection', and then go to the 'Review' tab to 'Protect Sheet'. This ensures users can only enter an ID without breaking the lookup formulas.