web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom SharePoint form...
Power Apps
Answered

Custom SharePoint form - missing person field value

(0) ShareShare
ReportReport
Posted on by

Dear all,

I have recently found a strange issue with my custom SharePoint form. I create a new entry, save it, I can see the value in SharePoint for both the Name and Line manager/Supervisor fields (both of them are Person type fields), but when I open the form, the Line manager/Supervisor field value is missing:

List valueList value

form valueform value

Also, when I filter the list down to one single item, sometimes there are digits instead of actual names in those two fields:

xsomej33_3-1634042371137.png

The only way how to overcome both issues is a refresh of the page, but I'd like to see if there is something else to be done.

 

In PowerApps, I've manipulated the DefaultSelectedItems for the Line manager/Supervisor data card, since for new records it's pulling data from another list. But for view/edit it should present what is already part of the list.

If(
SharePointForm1.Mode = FormMode.New,
LookUp('secondary list', DataCardValue2.Selected.Email = 'person'.Email).'Line Manager / Supervisor',
Parent.Default)

 

Any advice would be much appreciated here.

 

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @xsomej33 ,

     

    Since the Line Manager / Supervisor column is People type, and you are wanting to lookup for a person in this column based on DataCardValue2 selected Email and another list's manager column, please modify the formula for DefaultSelectedItems of the Combo box to:

     

    If(
     SharePointForm1.Mode = FormMode.New,
     LookUp(
     Choices(List1.'Line Manager / Supervisor'), 
     DisplayName = LookUp(
     'secondary list',
     DataCardValue2.Selected.Email = 'person'.Email
     ).'Line Manager / Supervisor'
     ),
     Parent.Default
    )

     

     

    The point is you will need to set the default selected item of the Combo box to one of the items that People column included ( Choices(List1.'Line Manager / Supervisor') ), and then the saved value could be displayed correctly.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • xsomej33 Profile Picture
    on at

    Hi @v-jefferni,

     

    Thanks for the advice, but I'm getting this error:

    xsomej33_0-1634111182584.png

    for the = sign in this part of the code:

    DisplayName = LookUp

    Any idea how to work around that?

  • v-jefferni Profile Picture
    on at

    Hi @xsomej33 ,

     

    What's the type of 'Line Manager / Supervisor' column in the list2, is it also a people column? I assumed it was Text column.

     

    So, if it is people column, then:

    If(
     SharePointForm1.Mode = FormMode.New,
     LookUp(
     Choices(List1.'Line Manager / Supervisor'), 
     DisplayName = LookUp(
     'secondary list',
     DataCardValue2.Selected.Email = 'person'.Email
     ).'Line Manager / Supervisor'.DisplayName
     ),
     Parent.Default
    )

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • xsomej33 Profile Picture
    on at

    Thanks @v-jefferni,

     

    Yes,  'Line Manager / Supervisor' column in the list2 is also people column.

    So, your advice fixed the issue I had - values are not correctly displayed every time in the form. But I've lost the automatic filling for new items - the field is blank now, although I can see that the formula is pulling the right data:

    xsomej33_0-1634112565288.png

     

     

  • v-jefferni Profile Picture
    on at

    Hi @xsomej33 ,

     

    Do you mean when in New mode and the Name dropdown has already selected an item, the Manager dropdown is still empty? 

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • xsomej33 Profile Picture
    on at

    Hi @v-jefferni,

    Yes - for new mode, the Name is prefilled with the name of the person which is opening the form and based on that the Manager is prefilled as well based on the value in the Name and value from the second list. This was working before, but now it doesn't fill anything automatically. 

  • v-jefferni Profile Picture
    on at

    Hi @xsomej33 ,

     

    You need to check the DefaultSelectedItems property of the Name Combo box, make the name auto-filled based on the logged in user:

    If(
     SharePointForm1.Mode = FormMode.New,
     LookUp(
     Choices(List1.Name), 
     DisplayName = User().DisplayName
     ),
     Parent.Default
    )

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • xsomej33 Profile Picture
    on at

    Hi @v-jefferni,

     

    The Name is working fine, but the Line Manager/Supervisor is not filled automatically. It was working before I applied your fix:

    If(
     SharePointForm1.Mode = FormMode.New,
     LookUp(
     Choices(List1.'Line Manager / Supervisor'), 
     DisplayName = LookUp(
     'secondary list',
     DataCardValue2.Selected.Email = 'person'.Email
     ).'Line Manager / Supervisor'.DisplayName
     ),
     Parent.Default
    )

    Now it's empty:

    xsomej33_0-1634192096426.png

     

  • v-jefferni Profile Picture
    on at

    Hi @xsomej33 ,

     

    Please try below instead in DefaultSelectedItems of the manager Combo box:

    If(
     SharePointForm1.Mode = FormMode.New,
     LookUp(
     Choices(List1.'Line Manager / Supervisor'), 
     DisplayName = LookUp(
     'secondary list',
     'person'.Email = User().Email
     ).'Line Manager / Supervisor'.DisplayName
     ),
     Parent.Default
    )

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • xsomej33 Profile Picture
    on at

    Thanks @v-jefferni

    Unfortunately the field remains blank even though I've applied the recommended steps. Any other idea? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard