cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Altsmith23
Level: Power Up

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

3 REPLIES 3

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!
Altsmith23
Level: Power Up

Re: Flow - Extract String Term Value

Would you expect this?

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

Altsmith23
Level: Power Up

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.'

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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

Top Kudoed Authors (Last 30 Days)
Users online (5,100)