Do you want to extract string after character using Power Automate flow? Then, this Power Automate tutorial is for you. Here, I will show you how to extract string after character in Power Automate with a few examples.
Scenario:
Recently, I got a requirement where I extract string after character using Power Automate flow. For example, if we have input values like below
Text@123
Once the string is presented after the character is extracted, it should display the value below:
123
Here, I will explain how to extract string after character using the Split() function in Power Automate with different examples.
Now, we will create a flow to extract string after character in Power Automate.
Cxtract string after character using Power Automate flow
Let us see how to extract string after character using Power Automate flow
Example – 1:
Step-1:
Create an instant cloud flow with a manual trigger; add two text input values to get the input string and the character to split.
Step-2:
And another compose data operation, to split the values based on the character presented in the string input.
split(triggerBody()['text'],triggerBody()['text_1'])
Where,
- Split – Function name
- triggerBody()[‘text’] – input string
- triggerBody()[‘text_1’] – character to split
Step-3:
Add another compose data operation, to get the output of the previous compose data operation.
outputs('Extract_String_after_character')[1]
Step-4:
Save and run the flow here. I have passed the input string as SPGuides@EnjoySharePoint passed the character as @, and selected the run flow option
Once the flow runs successfully, we can see the expected output in the compose data operation; it splits and displays the value based on the character.
This is how to extract string after character using Power Automate flow.
Example-2:
In this example, I will show you how to extract string after character from the SharePoint list text column using the Split() function in Power Automate flow.
Here, I am going to use the below Technologies SharePoint list, Consisting of
- Technology – default title column
- InputString– Single line of text type
Now, we will create a flow to extract string after character for the Input String column presented in the SharePoint list.
Step-1:
Create an instant cloud flow with a manual trigger, Expand the trigger action, and add a text input to get the character to split
Step-2:
select Get items action from action triggers, and configure the required parameters.
- Site Address – select the SharePoint site address from the dropdown
- List Name – choose the SharePoint list. Here I have selected my technology list
Step-3:
Add a new step, choose an Apply to each control, and pass the value from the dynamic content
Add compose data operation to split the values based on the character presented in the input string field in the SharePoint list.
split(items('Apply_to_each')?['String'],triggerBody()['text'])
Add another compose data operation, to get the output of the previous compose data operation.
outputs('Extract_String_after_character')[1]
Step-4:
Save and run the flow. I have passed the character & and selected the run flow option
Once the flow runs successfully, we can see the expected output in the compose data operation,
In the SharePoint list for the first item, it splits and returns the value as ModernSharePoint
For the second item presented in the SharePoint list, it returns the value as Power BI
This is how to extract string after character presented in the SharePoint list field using flow.
Conclusion
I hope you can extract string after character in Power Automate flow. Here, I have shown you how to extract string after character using the Split() function with different examples in Power Automate.
You may like the following tutorials:
- How to use append to string variable action in Power Automate?
- How to find text in a string using Power Automate?
- How to convert string to Date using Power Automate?
- How to Get First Word in a String using Power Automate?
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.