cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmaziwis
Resolver I
Resolver I

How to punch in information in a specific field and it returns values that autopopulates other fields

Hi All 

 

Iam building a form for a requirement I have but Iam not quiet sure how to resolve this.

I have a SQL table called Employees that has all the company Employee details  like the Site ,Name ,Job title and Department .

I want to be able to punch in my employee number BA1234 on the first field called Employee Number (text ) field nvarchar data type.

It will then populate Site 

                                Job title 

                               Department 

 

I had managed using cascading  dropdowns but the users don't want to scroll the list looking for an Employee number they  want to punch in the number and based on the information in the database it will populate  the site ,the job title ,the department of that employee. 

Autopopulate usingEmployee code.PNG

 

 

 

 

10 REPLIES 10
KroonOfficeSol
Resident Rockstar
Resident Rockstar

@rmaziwis Just for the fun of it a maybe better approach for your goal 😉

 

  • Replace the Textfield of your customer number by a ComboBox.
  • In your SQL table add a computed column (if you can) and concatenate the full name
    (WS_CONTAT function is best here and persistent set to true)
    (btw, you can also use AddColumns() formula in PowerApps to do the same)
  • Look at this video on how to connect the Combobox https://www.youtube.com/watch?v=GViad46xs9s&list=PL2zsZutKZiTPBnHR1-NnqewollxBfpqbE&index=37&t=0s
    Use the AddColumns Part, but skip the ShowColumns Part (ShowColumns will delete the rest of the columns of your table and you want to keep the whole record available)
  • Instead of the LookUp (Not needed anymore) connect the labels to ComboBox.SelectedItem.FieldYouLikeToShow.

Now you have Combobox (with two fields displayed) in which users can Manually SELECT and/or SEARCH based on EmployeeNumber or Employee Name. It makes sense to be able to do both, wouldn't you agree?

 

For the long run, this will make your app easier to use for most (even when the user is new to the app and/or doesn't know the employee number)

 

Hope this is a good addition.

 

Greetings,

 

Paul

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,328)