cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Garrelts
Level: Powered On

Name field in a form

I’m having trouble with an if statement. I have a list of names and if one is selected it fills in another name field with a supervisor. But when I do this the text will appear but it doesn’t fully find the name. Is it possible to have a pre set name in a name field?
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Name field in a form

@Garrelts 

I see the issue now.  You are trying to display the SupervisorName using  this code which is Text inside a table.

 

["Garrelts, Matthew D"]

 

SharePoint prefers this format instead.  A bit more complicated if I do say so myself...

 

If(
    Engineering_Lead_DatacardValue.Selected.DisplayName  = "Garrelts, Matthew D",
    {  
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
        Claims: "i:0#.f|membership|" & "mdgarrelts@yourcompany.com", 
        DisplayName: "Garrelts, Matthew D",
        Email: "mdgarrelts@yourcompany.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

8 REPLIES 8
Super User
Super User

Re: Name field in a form

@Garrelts 

It should be possible.  A little bit more info about what you are trying to do would be helpful.  Specific scenarios with a screenshot work best on the forum 🙂

Garrelts
Level: Powered On

Re: Name field in a form

Just put my computer up... I’ll try and explain it the best I can. If not I’ll send screen shots tomorrow.

I have an if statement based on a name field if it equals a name My original name column changes names to a supervisor name.

After doing this the if statement work and shows text. But if I it submit form it acts as if I have nothing selected. Any thoughts? Or need more information?
Super User
Super User

Re: Name field in a form

@Garrelts 
I feel like something is wrong with the Default property of this form field.  When a form is submitted it changes to view mode and shows whatever is in the Default property.  A screenshot and some code would help.

Garrelts
Level: Powered On

Re: Name field in a form

Yeah this value is an office 365 name field. Might try adding the varname code. When I get to work tomorrow I’ll send over some of the code and images.
Garrelts
Level: Powered On

Re: Name field in a form

Below are the images per our conversation. Let me know if you have further questions.

 

Image 1.PNGpulling choices to look into my list so i can get our office outlook contacts.

 

 

Image 2.PNGusing this if statement shows the name but when i submit the form it acts as if nothing is there or as if i never searched.

Super User
Super User

Re: Name field in a form

@Garrelts 

I see the issue now.  You are trying to display the SupervisorName using  this code which is Text inside a table.

 

["Garrelts, Matthew D"]

 

SharePoint prefers this format instead.  A bit more complicated if I do say so myself...

 

If(
    Engineering_Lead_DatacardValue.Selected.DisplayName  = "Garrelts, Matthew D",
    {  
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
        Claims: "i:0#.f|membership|" & "mdgarrelts@yourcompany.com", 
        DisplayName: "Garrelts, Matthew D",
        Email: "mdgarrelts@yourcompany.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

Garrelts
Level: Powered On

Re: Name field in a form

Had to add a few commas but this worked great. Thanks for your help.

Super User
Super User

Re: Name field in a form

@Garrelts 

I have updated the solution to include the missing commas.  Thanks for letting me know.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,688)