cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

First Name and last Name instead of Displayname

Hi guys, 

 

I read alot here but I still have no solution for my problem.

Looks like it's easy but .....not 😞

 

I have a SP-List with a Person column named "Bereitschaft".

Now I fill this column with e.g. "Rambo John" (Lastname/Firstname)

Now I want to extract ONLY Firstname "John".

 

I tried for example this:

 

1. last(split(triggerbody()?['Bereitschaft]?['DisplayName'],'')) , without a comma between ''

2. split(triggerBody()?['Bereitschaft']?['DisplayName'],'')?[0])

 

Without sucess. Everything what I get is again "Displayname".

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: First Name and last Name instead of Displayname

Hi @franky0711 

 

You almost go it. Try with the space as the delimiter.

 

See below.

 

 last(split(triggerbody()?['Bereitschaft]?['DisplayName'],' '))



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Highlighted
Helper III
Helper III

Re: First Name and last Name instead of Displayname

no problem - i got it to work with the follwing code in "apply to each":

 

last(split(items('Auf_alle_anwenden')?['Bereitschaftshabender']?['DisplayName'],' '))

 

Now it is all fine 🙂

 

Thank you again! I appreciate

View solution in original post

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: First Name and last Name instead of Displayname

Hi @franky0711 

 

You almost go it. Try with the space as the delimiter.

 

See below.

 

 last(split(triggerbody()?['Bereitschaft]?['DisplayName'],' '))



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Highlighted
Helper III
Helper III

Re: First Name and last Name instead of Displayname

Yes working now ! 

 

Thank you so much ! 

 

 
Highlighted
Helper III
Helper III

Re: First Name and last Name instead of Displayname

@abm 

 

Additional question:

 

I use this solution: last(split(triggerbody()?['Bereitschaftshabender']?['DisplayName'],' '))

 

 

Now I have another Flow:

But here i am on a "Apply to all" and I am getting errors see below.

I want to display in my Mail only Firstname again.

 

🙂

 

 

Thank you again flow_frage1.JPGflow_frage2.JPG

 

 

 

 

Highlighted
Super User III
Super User III

Re: First Name and last Name instead of Displayname

Hi @franky0711 

 

Could you please post the error details?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper III
Helper III

Re: First Name and last Name instead of Displayname

Hi @abm 

 

I did in my pictures: Here it is again:

 

Error (sorry in german):

 

Vorlagensprachausdrücke in den Eingaben der Aktion "E-Mail_senden_(V2)" in Zeile "1" und Spalte "2881" können nicht verarbeitet werden: Die Vorlagensprachfunktion "split" erwartet als ersten Parameter einen Parameter vom Typ "string". Der angegebene Wert ist vom Typ "Null". Details zur Syntax finden Sie unter https://aka.ms/logicexpressions#split..

Highlighted
Super User III
Super User III

Re: First Name and last Name instead of Displayname

Hi @franky0711 

 

Looks like the name you are splitting cannot see the firstname. Makes sure firstname is provided. If not it won't work and you will get the error. Check the run history and see what's returned before the Split expression. Looks to me its a data quality issue.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper III
Helper III

Re: First Name and last Name instead of Displayname

hi @abm

 

I try the same code and I have the same Sharepointlist like in my other case:

 

last(split(triggerbody()?['Bereitschaftshabender']?['DisplayName'],' '))

 

I think its because of the "triggerbody" and the "apply to each".

 

Error is: 

 

Vorlagensprachausdrücke in den Eingaben der Aktion "E-Mail_senden_(V2)" in Zeile "1" und Spalte "2882" können nicht verarbeitet werden: Die Vorlagensprachfunktion "split" erwartet als ersten Parameter einen Parameter vom Typ "string". Der angegebene Wert ist vom Typ "Null". Details zur Syntax finden Sie unter https://aka.ms/logicexpressions#split..

 

 

Highlighted
Super User III
Super User III

Re: First Name and last Name instead of Displayname

Hi @franky0711 

 

Without seeing the data it's difficult to give you a clear answer. Post a screenshot of your flow history and show the data what's been returned.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper III
Helper III

Re: First Name and last Name instead of Displayname

no problem - i got it to work with the follwing code in "apply to each":

 

last(split(items('Auf_alle_anwenden')?['Bereitschaftshabender']?['DisplayName'],' '))

 

Now it is all fine 🙂

 

Thank you again! I appreciate

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (6,906)