Hi
I've only been using PowerApps for a few weeks but I am having trouble figuring this one out.
I have a Powerapps form with a field for selecting user, and another field for inputting their employee I.D. When submitted this sends data to a SharePoint list
On another SharePoint list I have a person field and there Employee number stored.
What I want is with that original list, when a user enters their email address I want that Employee number to auto populate based on the second SharePoint list. Is that possible? Or is their an easier way.
Any help would be very much appreciated
Solved! Go to Solution.
I refreshed everything to be sure but no it was made yesterday. I ran the test, there appears to be nothing in the collection, its got all the fields I am looking for though:
Would you mind sending a screen shot of the code you tried along with the error text adn with the red line below the error?
sure, Employee ID is actually JNumber ( which I have been taking into account) Just thought Employee ID would be clearer .
Lookup('OCR Claimant List', EmployeeChoice_2.Selected.Email = Name.Email, JNumber)
Thanks - what control and what property has this code been applied to?
so the code is on the JNumber field default property
Hi @Pxtavern
I just tested this scenario on my side, which involves creating new items in a destination List 1, with LookUp to List 2 for ID and have it working as follows:
The intention is that when you select employee 'A' from the Employee dropdown in your form, jNumber for List 1 will undertake a LookUp to List 2 to seek out the email address under 'Name' that matches the selection made in your Employee dropdown control, and then return the corresponding ID field from that row of List 2 adn present that in your 'jNumber' field. To achieve this, the code is as follows in the 'Default' of the jNumber text input:
LookUp('List 2', EmployeeDropdown.Selected.Email = Name.Email, List2IDField)
Things to check:
Can you use the above to run through your own scenario and hopefully you can spot where something doesn't quite tally.
Thanks
BINGO! It's working thank you so much! However, I have no idea what fixed it. Heres the one that worked:
LookUp('OCR Claimant List', EmployeeChoice_2.Selected.Email = Name.Email, JNumber)
And here is the one I was doing before...
Lookup('OCR Claimant List', EmployeeChoice_2.Selected.Email = Name.Email, JNumber)
I have no idea why that now works, the only thing I can think of is I referenced the forms sharepoint list by mistake when retyping it, and then swapped it with the OCR Claimants list and it worked. No idea why that worked
Thank you so much for working that out 🙂
That's great - glad you're sorted. It was a strange one alright as you seemed to have everything as expected.
Please consider marking as a solution ✅ and hit the thumbs up 👍 if this was helpful in anyway.
Good luck with the rest of your build! ☘
Definitely helpful and the correct solution thanks a lot for your help 😃
User | Count |
---|---|
156 | |
91 | |
67 | |
63 | |
62 |
User | Count |
---|---|
211 | |
157 | |
96 | |
86 | |
76 |