Skip to main content
Question

Remove last item in from line-items or remove trailing comma from input strings

  • December 18, 2022
  • 1 reply
  • 172 views

I have two strings that are being output from Maximizer CRM.  The formulas that create the fields always ends with a comma which I can’t remove in the originating program.

I need to remove these trailing commas before using the strings in Formatter OR I need to remove the last item from the resulting line-items list.

Alternatively, is there a way to use a code step to remove the commas and create the line items?

I have no experience with code steps but will give it a go.

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

1 reply

MohSwellam
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+8
  • Zapier Orchestrator & Solution Partner
  • December 19, 2022

Hi @DryBSMT 

 

You can definitely use a code step to do that. Check out this resource for using split(). 
 

 

Your case will be much easier since it will use only comma.