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

Compose and join a string

Hello, 

 

I want to separate a name and then unify it with a period. For example: 

 

Luis Guzman (into) -> luis.guzman

 

The input for composing it would come from the outputs of the trigger 'When an item is created in sharepoint' variable called 'Owner Alias'. Like this:

image.png

 

 

 

 

 

 

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Compose and join a string

Hi @LuisGuzman98 

 

Please see below.

 

output1.png

 

Here I have used two split functions.

 

split('David Smith', ' ')[0].split('David Smith', ' ')[1]
 
When you add the expression use a period between the split expressions.

 

This is my output

 

output2.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

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!



View solution in original post

Super User
Super User

Re: Compose and join a string

Hi @LuisGuzman98 

 

What's the data type of your column?

 

Another way you could do is use two compose action steps. First compose just map the owner alias field. Second compose use the split. That might work.

 

Let me know how it goes.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

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!



View solution in original post

Community Support Team
Community Support Team

Re: Compose and join a string

Hi @LuisGuzman98,

 

Just like @abm said, you can use the Compose action to store the Owner alias before you use the expression, I have a way could also share with you:

toLower(replace(outputs('Compose'),' ','.'))

Annotation 2019-09-25 163531.png

 

Annotation 2019-09-25 163738.png

Best Regards,
Community Support Team _ Lin Tu

View solution in original post

11 REPLIES 11
Super User
Super User

Re: Compose and join a string

@LuisGuzman98
You'll want to use the split and concay expressions - I will provide an example later today.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Super User
Super User

Re: Compose and join a string

Hi @LuisGuzman98 

 

Please see below.

 

output1.png

 

Here I have used two split functions.

 

split('David Smith', ' ')[0].split('David Smith', ' ')[1]
 
When you add the expression use a period between the split expressions.

 

This is my output

 

output2.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

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!



View solution in original post

LuisGuzman98
Level: Powered On

Re: Compose and join a string

Hey @abm!

 

Thanks! I wanted to that for the 'Owner Alias' value of the item created in SP. I was entering this small code for capturing the dynamic variable from the trigger: 

 

split(triggerBody()?['Owner Alias'], ' ')[1]
 
But it doesn't work, the following message error is shown in the result:
 
image.png

 

How can I capture that dynamic variable for the split function?

 

 

 

Super User
Super User

Re: Compose and join a string

Hi,

 

Could you post your flow screenshot?

 

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!



Super User
Super User

Re: Compose and join a string

Hi @LuisGuzman98 

 

Try this.

output3.png

 

Here I am checking the index is greater than 1 then use the split index 0 and 1 under the compose statement. 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

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!



Super User
Super User

Re: Compose and join a string

Hi @LuisGuzman98 

 

The reason for your earlier error is most likely the value is null here. Use the below syntax so that if the value is null then it won't throw an exception.

 

split(triggerBody()?['Owner Alias'], ' ')?[1]

 

You could also try my earlier suggested solution.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

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!



LuisGuzman98
Level: Powered On

Re: Compose and join a string

@abm

 

It's weird if I provide just the owner alias dynamic variable in the compose action it does read it. It isn´t null.

 

image.pngDynamic variable providedimage.pngoutput

This is my flow configuration. I try it with the latest idea:

 

image.png

 

It ain´t working. The error is: 

image.pngnull parameter value error

I really don´t know why is it reading the value as null, because it does read it when it is just the dynamic value. 

 

Please help, thanks

Super User
Super User

Re: Compose and join a string

Hi @LuisGuzman98 

 

What's the data type of your column?

 

Another way you could do is use two compose action steps. First compose just map the owner alias field. Second compose use the split. That might work.

 

Let me know how it goes.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

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!



View solution in original post

Community Support Team
Community Support Team

Re: Compose and join a string

Hi @LuisGuzman98,

 

Just like @abm said, you can use the Compose action to store the Owner alias before you use the expression, I have a way could also share with you:

toLower(replace(outputs('Compose'),' ','.'))

Annotation 2019-09-25 163531.png

 

Annotation 2019-09-25 163738.png

Best Regards,
Community Support Team _ Lin Tu

View solution in original post

LuisGuzman98
Level: Powered On

Re: Compose and join a string

Hey Thanks! @abm,

 

That worked, I captured the content of the owner alias through a first compose action - > then I created a variable and assigned the output of the first compose as the value - > and the splited the variable. 

 

Great solution!

Super User
Super User

Re: Compose and join a string

Hi @LuisGuzman98 

 

Fantastic. Thanks for letting me know.

 



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!



Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 367 members 6,629 guests
Recent signins:
Please welcome our newest community members: