cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

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
Highlighted

@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
Highlighted
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

Highlighted

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,116)