Skip to main content

Notifications

Power Platform Community / Forums / Using Flows / Need Help Removing Bra...
Using Flows
Suggested answer

Need Help Removing Brackets, Parenthesis and Quotes Power Automate

Posted on by
Hello Power Automate: I have a people picket column that keeps including brackets, parenthesis, and quotes. I added the following action to remove them, but they have not been removed:
 
replace(replace(outputs('Join'),'[',''),']','')
 
I want the inputs in brackets to just include the names
 
  • Suggested answer
    CU21101414-0 Profile Picture
    CU21101414-0 on at
    Need Help Removing Brackets, Parenthesis and Quotes Power Automate
    There are multiple ways to handle this problem, but since I have ran into needing to do similar things to cleanup characters for folder names, fields, etc... You can create an array of characters you wish to remove and then loop through them.
    1.  Create a variable for your data (in my case this was a folder name):
    2. Create your array of characters to remove:  
      Example: 
      createArray('.','@','ß','²','³','µ','´','°','^','=','(',')','&','$','§', '~','#','%','*',':','<','>','?','/','|',' ', '[', ']', '"')
    3.  Loop through your array of characters.
    4.  Use compose to replace the current character in your string.
      Example: 
      replace(variables('varFolder'), item(), '')

    5. Update your variable with the cleaned output.
     
    Once done, you should have a value clean of any unwanted characters.
     
  • Suggested answer
    David_MA Profile Picture
    David_MA 6,664 on at
    Need Help Removing Brackets, Parenthesis and Quotes Power Automate
    Since you don't show how you configured the actions in your flow, I am not sure what you are doing. But, to get people out of a people picker field and have the names semicolon separated, you would do this: 
     
    1. Create an array variable with a default value of []
    2. Add an Apply to each action to the flow and point it to the people field through the dynamic content picker, choosing the option that does not contain DisplayName after it:
    3. Then add an Append to array action and enter the people picker field that does have DisplayName after it.
    4. You can then use a join expression on the variable to combine then into one string separated by the value of your choice. For example: join(variables('Approver'), '; ')
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Tuesday Tip #2 Global Search…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,008

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,531

Leaderboard

Featured topics

Restore a deleted flow