Im running into the following problem:
Got a flow that creates folders in SharePoint from Accounts in CRM dynamics.
But in CRM it is possible to use special characters in the accountname.
When the flow gets triggered and a special character is used.
It fails because a folder name can`t contain one of these characters.
Example of invalid characters:
# % * : < > ? / |
Im trying to replace these characters with @replace. But i dont know if its possible to replace all the characters in one function?
What i got now is:
replace(body('Account')['name'], '#, %, *, :, <, >, ?, /, |', '')
Please let me know if its possible
In this following link I found the most easy way to solve this problem
Just follow the steps 😄
https://www.alanps1.io/power-platform/flow/flow-stripping-unwanted-characters-or-special-characters-from-a-string/
can you please provide more details like how to use the function because, In my scenario i'm calling Flow From PowerApps and ParseJSOn is having an error below:
Flow: Can you mention whwere to use the function on flow
Step1: PowerApps
Step2: ParseJson
Step3:Compose
Step4:Create File
Step5: Respond To PowerApps
InvalidJSON. The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value
I'm not sure whether to use the function on a button from PowerApp or to use it in my Flow. Can you please provide more details.
Thanks,
MK1
hi,
I've tried the multiple replace function since 1 hour but without found the exact syntax. Thank you !
You can use replace within replace. I used this to remove illegal character in email subject. Not pretty but it works.
replace(replace(replace(replace(replace(replace(replace(replace(replace(triggerBody()?['Subject'],':',''),'%',''),'#',''),'*',''),'<',''),'>',''),'?',''),'/',''),'"','')
Thanks Peter for initial solution, and thanks Simon for your printscreens. I managed to figure this out also for my flow.
For anyone who is interested, here are the 2 formulas you need:
And also the printscreens of my solution.
Simon, could you please post the formula you have in replace(...) ? If I understand well, I need to refer to replace text in the 'textfeed' variable, but not really sure how to refer to content of this variable?
thanks peter,
As I don't use Dynamics I ended up using a Variable action instead. Initialise a varibale outside the for each and setting it to the initial value target output converted to text in this cse), then in the loop, set the variable with the upated value.
this works great if you want to replace the text with the same value (or in this case remove it) but I'm wondering if instead of an array you could use a json, where you find the 'key' then update it with the value.
Here they are
I get the idea, but it would help a lot if you could post the printscreen with expanded loops sections - the formulas are key here 🙂
Thanks a million!
could post a screenshot of your expanded condition?
But if Iunderstand you correctly, in your condition you are writing back to dynamics, so when the loop starts again it works with the updated variable?
stampcoin
99
Michael E. Gernaey
82
Super User 2025 Season 1
David_MA
48
Super User 2025 Season 1