Best answer

Zapier Formatter: split text

  • 14 January 2023
  • 2 replies
  • 1882 views

Userlevel 1
Badge +1

Hello,

I use a Formatter Split Text action to separate a number from the line item data. The intent is to return the last segment of text. The set up action is below.

 

But the result return 2 identical outputs. How can I return only one output, which is the last segment of the text?

 

Any help would be much appreciated!

icon

Best answer by nicksimard 14 January 2023, 02:37

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +11

Hi @ASAoperations!

Based on the screenshot above it looks like that initial field may be in line item format. Instead of Split Text you’ll want to use this Formatter function instead:

This will give you each of the items as its own field, as well as item_last (which is what it sounds like you were trying to access).

You can see that when I use Split Text the output looks like this:

 

If there is a variable number of items that come through when my Zap runs, I wouldn’t want to always count on my desired text being in item 3 (as shown above).

Can you give Line-Item to Text a try to see if it gets you what you need?

Userlevel 1
Badge +1

Hi @nicksimard 

 

Thanks so much for the tips. A bit of a tweak and now I’m able to extract the data I need.

What I’ve done was:

Formatter Utilities function to transform in line item to text:

Add a Formatter Split Text to get the last segment of text: