cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (20,351)