cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gazzo1967
Impactful Individual
Impactful Individual

Return value from another sharepoint list using a LOOKUP

Hi
i have a person/group field that has to be completed in a form which will be submitted to a list.
What i would like to do is check the name and return the latest record from another list (if exists) this is to be used in validation not resubmitted.
so if name in DataCard7 = the field in other sharepoint list (another person field) then return the latest value of 'date of assessment' column(lookUP List) for that person

i have (with my limited logic) come up with this but as my logic is flawed it does not work.
TEXT = If(LookUp('BA1 Hot wear', DataCardValue7.Selected.DisplayName = 'Candidate Name'),'Date of Assessment')

regards gary

1 ACCEPTED SOLUTION

Accepted Solutions

@pontusofsweden 
HI

Thank you for the response 🙂

Your suggestion gave me the right direction.
on looking back yes you are right i don't know why i used IF either..been a long day 😞

What i actually need to make my function work was this
LookUp('BA1 Hot wear', 'Candidate Name'.DisplayName = DataCardValue7.Selected.DisplayName,'Date of Assessment')
Thank you for giving me direction 🙂

Gary

View solution in original post

2 REPLIES 2
pontusofsweden
Resolver IV
Resolver IV

Hi!

First of all, I dont really know why you have an If-statement. If you dont find a record, it will give you a blank value anyway. Second, the "DisplayName" you are referring to is the property DisplayName of the DataCard control. Since a form already is connected to a specific record, you could use ThisItem instead. Also, since a person field in SP only refers to an Id, you need to go a step further to retrieve the DisplayName. See formula below:

 

TEXT = LookUp('BA1 Hot wear', 'Candidate Name'.DisplayName = ThisItem.Person.DisplayName,'Date of Assessment').

 

Change "Person" to your column name, that should do the trick 🙂

 

BR Pontus

@pontusofsweden 
HI

Thank you for the response 🙂

Your suggestion gave me the right direction.
on looking back yes you are right i don't know why i used IF either..been a long day 😞

What i actually need to make my function work was this
LookUp('BA1 Hot wear', 'Candidate Name'.DisplayName = DataCardValue7.Selected.DisplayName,'Date of Assessment')
Thank you for giving me direction 🙂

Gary

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,243)