Hello,
Matthew Devaney kindly provided a formula for the person fields in my gallery that abbreviates the name to lastname.first initial (e.g. Agustin, T.). It works great when you are pointing to a person field.
With(
{UserName: Split(ThisItem.'Created By'.DisplayName, " ")},
First(UserName).Result & " " & Left(Last(UserName).Result,1)& "."
)
Here is my challenge. I have a column of names that is being brought into the Gallery as a Text value, based on a LookUp so the formula above doesn’t work for that scenario. Rather than ask for help rewriting the above formula to work for a name brought in as text, I would prefer to import the name as a person field if possible.
Here is more context for clarification:
When a user selects a Project Number from a dropdown menu in the New Request Form, the Text property of the Program Mgr/Product Engineer label is automatically populated via the following formula. So far, so good. The information is coming over as a user name.
LookUp('Project List','Project Number' = ddProjectNumber.Selected.'Project Number','Project Owner'.DisplayName)
Here is where things go sideways. In order to write this information back to my Tool Design Support Request SharePoint list, I kept the original text input field that came with the datacard and set the Default property to: lblPMPE.Text
The label is visible to the user, the text field is hidden since its sole purpose is to write data back to SharePoint.
How should I write the text property formula for the hidden field so it is recorded back to SharePoint as a person field instead of a text field? I figure if I do it this way, I can apply Matthew's formula to the Project Owner name in my gallery. I assume that I will have to delete the single line of text column in my Tool Design Support Request SharePoint list and create a person column instead to capture this information. Can you confirm?
Thank you in advance for your help. Teresa
Solved! Go to Solution.
I don't believe your issue is going to be with the splitting or label contents or anything like that, my assumption is that you have a Person Column in your SharePoint list and you want that to have the person that is the Program Mgr/Product Engineer written to that column.
The Program Mgr/Product Engineer information is currently coming to you from Lookup on 'Project List' and you state it is in a Full name format (first and last).
You have a label and a textinput control on your form. The input is hidden (not visible) and the label is visible. They both contain the name of the person you want to write to SharePoint.
I hope that so far the above is all accurate.
So, first, you need not have a separate hidden textinput control for this, you can work entirely from the Label. I will proceed as such.
Since you are working with a Person column in SharePoint, the key is you need the email address of the person. So, Display names or other splitting of them is of no value in the person column.
I am going to assume that the 'Project List'.'Project Owner' column is a Person column as well.
If so, then you can simply change the Default property of your data card in your EditForm for the PM/PE column to the following:
LookUp('Project List',
'Project Number' = ddProjectNumber.Selected.'Project Number',
'Project Owner')
That person column in the Project List will have the proper signature for writing to SharePoint into a Person column.
Once you have that, you can get rid of the TextInput control that is hidden - it's not needed.
And you can have the Label Text property in your DataCard set to Parent.DisplayName
I hope this is clear for you - let me know if you run into bumps along the way.
No worries, I actually took today to catch up on a slew of apps currently in the design stage. So checking the forum is no problem.
So, this formula:
With({dn:Match(ThisItem.'ME Assigned'.DisplayName, "^.*\s.").FullMatch},
If(IsBlank(dn), "Pending", dn & ".")
)
Should work perfectly for you if you are in an EditForm. Your label is in an EditForm DataCard - correct?
To explain what it does,
First it performs a Match on the current record of the Form (ThisItem) and the 'ME Assigned'.DisplayName with a regular expression that will return (FullMatch) the first name and the first initial of the last. To really break that down:
^.*\s.
^ - start from the first character and match .* any number of actual characters until a \s space, then match . one character. It's just a little cleaner that splitting and concatenating and lefting and so forth.
Now, we store that in a With variable called dn (just because we don't want to repeat in the coming if statement.
And in the If statement, we look to see if it is blank...if so, say "Pending". If not, then display it (dn) with a "period" on the end.
This works just fine, so if it is not, then we need to explore more of what your scenario is. The only thing I would think is that perhaps you are not in an Edit Form DataCard? Or that you are not changing the correct property (should be the Text property).
Actually, the formula that @mdevaney provided should be just as well in your Gallery. What kind of problems are you experiencing getting that to work properly?
I mention it because it will be simpler than dealing with a Person column in SharePoint. If you can avoid using them, it is better, and I believe you are only trying to use that in order to get a previous formula to work for you - which would be better figured out than worked around.
If you want to proceed with the Person column in SharePoint, then the first question will be, are you submitting data via a form or through a Patch statement?
Hi Randy,
I get two errors:
1) Invalid use of Label1.Text
2) The function 'Split' has some invalid arguments
Teresa
I don't believe your issue is going to be with the splitting or label contents or anything like that, my assumption is that you have a Person Column in your SharePoint list and you want that to have the person that is the Program Mgr/Product Engineer written to that column.
The Program Mgr/Product Engineer information is currently coming to you from Lookup on 'Project List' and you state it is in a Full name format (first and last).
You have a label and a textinput control on your form. The input is hidden (not visible) and the label is visible. They both contain the name of the person you want to write to SharePoint.
I hope that so far the above is all accurate.
So, first, you need not have a separate hidden textinput control for this, you can work entirely from the Label. I will proceed as such.
Since you are working with a Person column in SharePoint, the key is you need the email address of the person. So, Display names or other splitting of them is of no value in the person column.
I am going to assume that the 'Project List'.'Project Owner' column is a Person column as well.
If so, then you can simply change the Default property of your data card in your EditForm for the PM/PE column to the following:
LookUp('Project List',
'Project Number' = ddProjectNumber.Selected.'Project Number',
'Project Owner')
That person column in the Project List will have the proper signature for writing to SharePoint into a Person column.
Once you have that, you can get rid of the TextInput control that is hidden - it's not needed.
And you can have the Label Text property in your DataCard set to Parent.DisplayName
I hope this is clear for you - let me know if you run into bumps along the way.
Thank you for your help Randy. It all worked out great. I'll mark it as a solution. Can I ask you one more related question? In my gallery I have a "Mechanical Engineer" column. An ME is assigned after a request is submitted. Currently, a small dot appears if the value is blank. Can you help me write an If statement to the affect of "If this item is blank have the column field read "Pending" else fill in the name of the ME that was assigned"?
I tried the following, but it isn't working.
If(IsBlank, "pending", With(
{UserName: Split(ThisItem.'ME Assigned'.DisplayName, " ")},
First(UserName).Result & " " & Left(Last(UserName).Result,1)& "."
))
Thank you,
Teresa
Sure thing. I assume this is a Label in your gallery that we are talking about.
If so, then set the Text property to:
Coalesce(ThisItem.'ME Assigned'.DisplayName, "Pending")
I'm not entirely sure why you are using the Split function to split a display name that is separated by a space and then put it back together with the space. Is this only so that you can have a abbreviated last name (as I see you use the Left function).
To add on to the previous response - if you DO want to have first and first letter of last name, you might want to just substitute the following:
Coalesce(Match(ThisItem.'ME Assigned'.DisplayName, "^.*\s.").FullMatch, "Pending")
If the period you have after the last name initial is important, then go with this:
With({dn:Match(ThisItem.'ME Assigned'.DisplayName, "^.*\s.").FullMatch},
If(IsBlank(dn), "Pending", dn & ".")
)
Hi Randy,
Yes, this is a label in the gallery. I'm currently using the formula shown below provided by Matthew Devaney. Not sure how to combine it with the Coalesce statement. I tried replacing the formula below with the Coalesce formula, but received the following error message: Unexpected characters. Characters lblMEAssigned.Text. The ME Assigned column is set to "person".
To answer your question of why the Split approach, I had told Matthew that I would like the format to be LastName, FirstInitial. (e.g. Agustin, T.).
With(
{UserName: Split(ThisItem.'ME Assigned'.DisplayName, " ")},
First(UserName).Result & " " & Left(Last(UserName).Result,1)& "."
)
Thanks for all your help on a Sunday. I realize you have a life so don't feel you have to respond today if you are trying to fit in some R & R.
Kind regards,
Teresa
No worries, I actually took today to catch up on a slew of apps currently in the design stage. So checking the forum is no problem.
So, this formula:
With({dn:Match(ThisItem.'ME Assigned'.DisplayName, "^.*\s.").FullMatch},
If(IsBlank(dn), "Pending", dn & ".")
)
Should work perfectly for you if you are in an EditForm. Your label is in an EditForm DataCard - correct?
To explain what it does,
First it performs a Match on the current record of the Form (ThisItem) and the 'ME Assigned'.DisplayName with a regular expression that will return (FullMatch) the first name and the first initial of the last. To really break that down:
^.*\s.
^ - start from the first character and match .* any number of actual characters until a \s space, then match . one character. It's just a little cleaner that splitting and concatenating and lefting and so forth.
Now, we store that in a With variable called dn (just because we don't want to repeat in the coming if statement.
And in the If statement, we look to see if it is blank...if so, say "Pending". If not, then display it (dn) with a "period" on the end.
This works just fine, so if it is not, then we need to explore more of what your scenario is. The only thing I would think is that perhaps you are not in an Edit Form DataCard? Or that you are not changing the correct property (should be the Text property).
Thank you Randy. You're the best! I applied this formula to the label in my gallery and it worked perfectly. I really appreciate you taking the time to explain what the formula means. I will keep it for future reference. Teresa
Dear Community Members, We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd. During this period, members will not be able to Kudo, Comment, or Reply to any posts. On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities. What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!
We are excited to announce the Summer of Solutions Challenge! This challenge is kicking off on Monday, June 17th and will run for (4) weeks. The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities. Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”) - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024 Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods. You must enter into each weekly Entry Period separately. How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different. Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers. At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing. Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner. A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random. Individuals will be contacted before the announcement with the opportunity to claim or deny the prize. Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners. Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event. ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE** Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08 23 @WarrenBelz 31 @DBO_DV 10 @Amik 19 AmínAA 6 @mmbr1606 12 @rzuber 4 @happyume 7 @Giraldoj 3@ANB 6 (tie) @SpongYe 6 (tie) Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08 10@WarrenBelz 25 @DBO_DV 6@mmbr1606 14 @AmínAA 4 @Amik 12 @royg 3 @ANB 10 @AllanDeCastro 2 @SunilPashikanti 5 @Michaelfp 2 @FLMike 5 @eduardo_izzo 2 Meekou 2 @rzuber 2 @Velegandla 2 @PowerPlatform-P 2 @Micaiah 2 Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27 Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8 SunilPashikanti8
On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners. The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights. Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.
We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for. We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer. Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together. Here's to new beginnings and endless possibilities! If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport. To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages