cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sasidhar_mudra
Helper III
Helper III

LookUp issue

Hi All,

 

I have a SP list with Employee ID, Employee Name, Manager Name and so on.

 

I have an app created in Powerapps. I want to use Lookup function in such a way when i select an employee id i want the employee name and based on employee name the manager name should appear. I used the below code against the Employee Name, however, i do not see the employee name appearing 😞

 

LookUp('Worker Details_12-Sep-19',Employee_x0020_Name=DataCardValue1.Text,"Employee Name")

Screenshots of SP list and Powerapps for reference.

 

Can someone help me where did i go wrong?

oneonone-new1.JPGoneonone-new.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @sasidhar_mudra ,

Could you please share a bit more about your scenario?

Do you want to retrieve the corresponding Employee Name based on the Employee ID? Do you want to auto-populate the Employee Name text box based on the Employee ID?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

Set the Default property of the Text Input box (DataCardValue2) within the Employee Name data card to following:

LookUp('Worker Details_12-Sep-19', 'Employee ID' = DataCardValue1.Text, 'Employee Name')

or

LookUp('Worker Details_12-Sep-19', 'Employee ID' = DataCardValue1.Text).'Employee Name'

If you want to auto-populate the Manager Name Text box, please take a try with the following workaround:

Set the Default property of the Text Input box within the Manager Name data card to following:

LookUp('Worker Details_12-Sep-19', 'Employee ID' = DataCardValue1.Text, 'Manager Name')

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
mdevaney
Super User
Super User

@sasidhar_mudra 

Please try this instead and ensure the 3rd parameter of LookUp does not have any quotes.

 

LookUp('Worker Details_12-Sep-19',Employee_x0020_Name=DataCardValue1.Text,Employee_x0020_Name)

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Edwin-Abdalian
Impactful Individual
Impactful Individual

If you please tell me what you are trying to do with that form, it will make it easier to answer your question. are you trying to view your record? before we even validate your formula, why are you considering using the formula in the Update of the datacard?

@Edwin-Abdalian ,

 

I created this form to collect inputs from the employees and save the inputs to SP list.

I do not want to manually input all the employee details in the form, hence lookup which will make my job easy to populate details like the name, manager name and so on when i enter Employee ID.

 

Since i am not a programmer :(, I gave it a try using the formula in Update as it did not work in Default property of the Employee_x0020_Name datacard (DataCardValue2). 

 

The SP list i created is all of "Single line of text". Not sure if that is the problem.

 

 

Regards

Sasidhar

@mdevaney ,

 

No sir, it did not work. 

 

 

Regards

Sasidhar

I would do it this way. and based on your story, I'm assuming that your list has all the EmployeeIDs and NAmes, but the rest of the info is blank and users have to go and fill them.

1- Create a textBox out of the form to enter the EmployeeID. (change the Type of it to Number)

2- Your form Data Source is your EmployeeList, change the Item Property to LookUp('EmployeeList', EmployeeID = Value(txtEmployeeID.Text))

employee.PNG

I hope this helps. but feel free to ask any other questions.

-----------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

v-xida-msft
Community Support
Community Support

Hi @sasidhar_mudra ,

Could you please share a bit more about your scenario?

Do you want to retrieve the corresponding Employee Name based on the Employee ID? Do you want to auto-populate the Employee Name text box based on the Employee ID?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

Set the Default property of the Text Input box (DataCardValue2) within the Employee Name data card to following:

LookUp('Worker Details_12-Sep-19', 'Employee ID' = DataCardValue1.Text, 'Employee Name')

or

LookUp('Worker Details_12-Sep-19', 'Employee ID' = DataCardValue1.Text).'Employee Name'

If you want to auto-populate the Manager Name Text box, please take a try with the following workaround:

Set the Default property of the Text Input box within the Manager Name data card to following:

LookUp('Worker Details_12-Sep-19', 'Employee ID' = DataCardValue1.Text, 'Manager Name')

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft ,

 

It worked. Thank you 🙂

 

Thanks

Sasidhar

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,286)