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

Special characters or inline functions

Hello,

  I am trying to do a simple flow to take email attachments and create them in a sharpoint file directory.  I need to use the email subject as the file name but they contain a colon which is an invalid character.  Is there any way to search and replace when creating the file name in the flow?

 


Thanks

Andrew

 

13 REPLIES 13
Super User
Super User

Re: Special characters or inline functions

Hi @andrewr,

 

This is what you want.

 

My Flow configuration:

 

 



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!



andrewr
Level: Powered On

Re: Special characters or inline functions

Looks like the end of your message didn't come through :-\

Super User
Super User

Re: Special characters or inline functions

Hi @andrewr,

 

You need to use Compose and utilise the workflow definition language function called replace.This is what you want.

 

https://docs.microsoft.com/en-us/rest/api/logic/definition-language

 

My Flow configuration:

 

s1.png

 

 

s2.png

 

My Flow Test Result:

 

s3.png

 

Email Send with Attachmen and Subject as 'TestDoc:Aj'

 

s4.png

 

SharePoint File uploaded without colons.

 

 

 

 

 

If you need any more help please let me know.

 

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!



Highlighted
Super User
Super User

Re: Special characters or inline functions

Hi @andrewr,

 

You need to use Compose and utilise the workflow definition language function called replace.This is what you want.

 

https://docs.microsoft.com/en-us/rest/api/logic/definition-language

 

My Flow configuration:

 

s1.png

 

 

s2.png

 

My Flow Test Result:

 

s3.png

 

Email Send with Attachmen and Subject as 'TestDoc:Aj'

 

s4.png

 

SharePoint File uploaded without colons.

s5.png

 

 

 

 

 

 

 

If you need any more help please let me know.

 

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!



andrewr
Level: Powered On

Re: Special characters or inline functions

Thanks, this is really helpful.

 

I'm just wondering if there is more than one attachment will it fail?

Super User
Super User

Re: Special characters or inline functions

Hi @andrewr,

 

I haven't tested with multiple. It should work if you using the actual filename. As you can see the flow SP template (See above) is in a loop.

 

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!



andrewr
Level: Powered On

Re: Special characters or inline functions

I need the file name to be the subject of the email, but I wonder if I can concatenate the original file name too.  Any thoughts?

Super User
Super User

Re: Special characters or inline functions

Hi @andrewr,

 

You need to do the following:

 

1. Add another compose and map the input parameter as Attachment Name.

2. Use the concat function to get together this output & subject.

 

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!



andrewr
Level: Powered On

Re: Special characters or inline functions

Are there details of the concat fucntion?  I haven't been able to find it via a search

 

Super User
Super User

Re: Special characters or inline functions

Hi @andrewr,

 

This is documentation you need https://docs.microsoft.com/en-us/rest/api/logic/definition-language

 

Please follow the below flow for your requirement.

 

 



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: Special characters or inline functions

Hi @andrewr,

 

This is documentation you need https://docs.microsoft.com/en-us/rest/api/logic/definition-language

 

Please follow the below flow for your requirement.

 

p1.pngp2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

p3.png 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If you need anymore help please let me know.

 

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!



andrewr
Level: Powered On

Re: Special characters or inline functions

The compose steps don't seem to be executing....as you can see in the screen shot it's trying to pass the code from the compose step as the file name

 snip.PNG

Super User
Super User

Re: Special characters or inline functions

Hi @andrewr,

 

When you  type the input value in compose use double quotes (") at the beginning and end.

 

e.g: "@concat(outputs('filename'),outputs('fname'))"

 

Once you save the flow and go back to edit it should disappear the doubles quotes and it should be non-editable. Probably the non-editing part is a bug :-).

 

Let me know how it goes.

 

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!



Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Users Online
Currently online: 182 members 4,056 guests
Please welcome our newest community members: