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

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
Highlighted
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!

Learn more from my blog

View solution in original post

Highlighted
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!

Learn more from my blog

View solution in original post

Highlighted
Community Support
Community Support

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
Highlighted
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
Highlighted
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!

Learn more from my blog

View solution in original post

Highlighted
Helper II
Helper II

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?

 

 

 

Highlighted
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!

Learn more from my blog
Highlighted
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!

Learn more from my blog
Highlighted
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!

Learn more from my blog
Highlighted
Helper II
Helper II

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.

 

Dynamic variable providedDynamic variable providedoutputoutput

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

 

image.png

 

It ain´t working. The error is: 

null parameter value errornull 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

Highlighted
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!

Learn more from my blog

View solution in original post

Highlighted
Community Support
Community Support

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

Highlighted
Helper II
Helper II

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!

Highlighted
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!

Learn more from my blog

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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 (9,668)