cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Flow - Extract String Term Value

I am attempting to use Flow to abstract a termset value to populate a standard text field.

For example, I have a managed metadata column which i populate with the term "Everton"

Use a flow, i wish to extract the Term Value i.e. Everton (before the Pipe | ) and place this String into a Text column within the same list item. 

 

 Everton|29d10675-2d1d-4402-9dcc-bc45855ea5f2

Is this possible?  how do i go about this?

thanks

Andrew

4 REPLIES 4
Highlighted
Resolver II
Resolver II

Re: Flow - Extract String Term Value

@Altsmith23 ,

 

You will need to use both the substring and indexOf expressions.

 

See image below:

Snag_17e213bc.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You will use substring to extract the text and indexOf to find the "|" character. Your expression should look like this:

 

substring( Field Name, 1, indexOf('|'))
 
Except in your case you will replace "Field Name" with the field you want to extract the text from. Make sure you select it using the dynamic content selector. 
 
 
If this works please mark it as the solution!
Highlighted
New Member

Re: Flow - Extract String Term Value

Would you expect this?

substring(triggerBody()?['Taxono']?['Value'],1,indexOf('|'))

Highlighted
New Member

Re: Flow - Extract String Term Value

@danmitchell36 

 

Hello Dan, on initial trials this was returning on testing

 

InvalidTemplate. Unable to process template language expressions in action 'Update_item' inputs at line '1' and column '2523': 'The template language function 'indexOf' expects two parameters: the string as the first parameter, the value to find the index of as the second parameter. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#indexof for usage details.'

Highlighted
Solution Specialist
Solution Specialist

Re: Flow - Extract String Term Value

Hi Andrew,

 

Please use the formula this way:

 

substring(variables('Field Name'),indexOf(variables('Field Name'),'|'))

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (5,020)