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

Person field to display 1 user

I have a person field from SPO

 

How can i make it to pre-populate with a single user, which will never change?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Person field to display 1 user

@Lefty 
I think the User email is missing on your Claims line.

 

{
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims:"i:0#.f|membership|" & "Myemail@domain.com",
    DisplayName:  "My Name",
    Email:  "Myemail@domain.com",
}

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

19 REPLIES 19
Highlighted
Post Prodigy
Post Prodigy

Re: Person field to display 1 user

hmm possibly figured it but need to test:

{  
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
    Claims: "i:0#.f|membership|" & "", 
    DisplayName: "My Name",  
    Email: "Myemail@domain.com"
}
Highlighted
Solution Supplier
Solution Supplier

Re: Person field to display 1 user

I think you can try it with the Office365users connector, like this with 'john.smith@mycompany.com' as example for an user:

Office365Users.UserProfile("john.smith@mycompany.com")

 

Highlighted
Super User
Super User

Re: Person field to display 1 user

@Lefty 
I think the User email is missing on your Claims line.

 

{
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims:"i:0#.f|membership|" & "Myemail@domain.com",
    DisplayName:  "My Name",
    Email:  "Myemail@domain.com",
}

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: Person field to display 1 user

@mdevaney 

 

Thanks, as i just tried it with what I had and it failed to send that user an email.

I'll try your approach.
Quick question, will this work, if the screen this field is on, has not been accessed yet, rather I am emailing this user in the field in a screen before any user comes to that screen:

 

Office365Outlook.SendEmailV2(Form1Head.LastSubmit.ManagerName.Email...................

 

Highlighted
Post Prodigy
Post Prodigy

Re: Person field to display 1 user

Thanks @SkiDK 

Hmm, Didn't think it would be that simple, that seems to work, but I cant seem to use that field to email the user i get an error when my form submits

Highlighted
Post Prodigy
Post Prodigy

Re: Person field to display 1 user

@mdevaney 

 

Thanks, but it doesnt allow me to send an email to that user, as per my previous message, this field is on Screen9, and the user submitting the form is in Screen8

I guess I can hard code the users email in the send to email, I was just hoping I would not need to

Highlighted
Super User
Super User

Re: Person field to display 1 user

@Lefty 
The Office365Outlook.SendEmailV2 will work from any screen but keep in mind your Form will have to be submitted in order to use LASTSUBMIT in your formula.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Post Prodigy
Post Prodigy

Re: Person field to display 1 user

@mdevaney 

 

Yes the form has been submitted a few times, by the time it gets to this stage, all previous submissions work fine, but with this new addition to requirements, cant get it to function

Highlighted
Super User
Super User

Re: Person field to display 1 user

@Lefty 

Does it work if you use the Mail property instead of Email?


Form1Head.LastSubmit.ManagerName.Mail

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,549)