cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sgokul95
Helper I
Helper I

Search a lookup column in SharePoint and get a value from that record/row

Hi All, 

 

I am having a main list (ListA) and sub-list (SubListA) and the sub-list(SubListA) has 2 lookup columns. In PowerApps, I want to search the sub-list(SubListA) and get the record/row.

 

I have a value (Part1abc) that needs to be searched in the "PartA:Name" lookup column in the sub-list and get this record and then need the value of the Status column of that record. I have attached below the image of the lists for better understanding.

 

sgokul95_0-1635856893022.png

Can anyone please help me out here?

1 ACCEPTED SOLUTION

Accepted Solutions
anibra
Resolver I
Resolver I

Hi @sgokul95 Can you try it without the Status.Value, just LookUp(SubListA, PartA:Name.Value = "Part1abc"). If you want to show the Status then use LookUp(SubListA, PartA:Name.Value = "Part1abc").Status

View solution in original post

6 REPLIES 6
anibra
Resolver I
Resolver I

Hi @sgokul95. You can try: LookUp(SubListAPartA:Name.Value = Part1abc)

I tried it as below:

 

LookUp(SubListA, PartA:Name.Value = "Part1abc", Status.Value)

 

But I am getting a error in the PartA:Name.Value = "Part1abc". It says "Invalid argument type(Record). Expecting a boolean value instead". 

 

 

anibra
Resolver I
Resolver I

Hi @sgokul95 Can you try it without the Status.Value, just LookUp(SubListA, PartA:Name.Value = "Part1abc"). If you want to show the Status then use LookUp(SubListA, PartA:Name.Value = "Part1abc").Status

View solution in original post

anibra
Resolver I
Resolver I

Hi @sgokul95,

Have you solved your problem?

Do you want to search in the sub-list(SubListA) for the status value based on the Part1abc?

Could you please share a bit more about the Status column, is it a Choice type?

 

@anibra has provided a correct formula if you have a status column of Choice type, please check it one more time to see if this could solve your problem.

 

Not sure if you want to refer to this status value in the main list, if so, you should keep the data type matched to each other.

Best Regards,
Qi
sgokul95
Helper I
Helper I

Hi @anibra & @v-qiaqi-msft ,

 

Thanks for your help. It is working fine now. The error in PartA:Name.Value went away after I used the PowerApps suggested change for PartA:Name.Value as ('PartA:Name').Value. Also I have obtained the Status value as suggested by @anibra now.

LookUp(SubListA, ('PartA:Name').Value = "Part1abc").Status

 

Thank you both @anibra & @v-qiaqi-msft for helping me out here as I am new to PowerApps so I am facing some frequent queries related to the syntax and formulas and trying to understand them by going through the forums and some links. 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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