Skip to main content
Best answer

Retain Comma in Input Value

  • Oct 22, 2024 7:44 AM UTC
  • 6 replies
  • 154 views

Code action is used.

Set the input to a list of phone numbers obtained from Salesforce, as shown below.
At this point, there is a comma in the value, like “,,,090-0000-4444,090-0000-1111”.

 

When you go to the next step and try to execute, the comma will be missing from the value.

 

Is there any way to treat this as data with commas?

Best answer by SamB

Hey @Suzuki 👋

It seems that part of the issue is that the commas that appear aren’t really there, they’re just how line items are visually separated in the Zap editor. And the other part is that with Formatter, null (empty) line items are ignored which is why you’re only seeing two values separated by a & in that Output Text field.

There was a workaround shared in the Community a while back that should allow you to convert those empty line items into a &:

Can you give that a try and let us know whether that does the trick?

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.

6 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Oct 22, 2024 2:46 PM UTC

Hi @Suzuki 

Add this Zap step before: Formatter > Utilities > Line Items to Text


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • Oct 23, 2024 2:32 AM UTC

Hey @Suzuki,

 

Please keep us in the loop for this one. Let us know if Troy’s recommendation got you going with your Zap. Thank you.


  • Author
  • Beginner
  • Oct 23, 2024 3:54 AM UTC

Hi @Suzuki 

Add this Zap step before: Formatter > Utilities > Line Items to Text

Thank you for your reply.

 

I tried that, but it didn't solve the problem.

Similarly, the comma disappears in Data in.

 

I am expecting the output as below.

「&&&090-0000-4444&090-0000-1111」

 

 

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • Answer
  • Oct 23, 2024 10:46 AM UTC

Hey @Suzuki 👋

It seems that part of the issue is that the commas that appear aren’t really there, they’re just how line items are visually separated in the Zap editor. And the other part is that with Formatter, null (empty) line items are ignored which is why you’re only seeing two values separated by a & in that Output Text field.

There was a workaround shared in the Community a while back that should allow you to convert those empty line items into a &:

Can you give that a try and let us know whether that does the trick?


  • Author
  • Beginner
  • Oct 24, 2024 2:44 AM UTC

Hey @Suzuki 👋

It seems that part of the issue is that the commas that appear aren’t really there, they’re just how line items are visually separated in the Zap editor. And the other part is that with Formatter, null (empty) line items are ignored which is why you’re only seeing two values separated by a & in that Output Text field.

There was a workaround shared in the Community a while back that should allow you to convert those empty line items into a &:

Can you give that a try and let us know whether that does the trick?

 

Thank you for your reply.

 

I was able to resolve the issue using the method you shared.


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • Oct 24, 2024 9:24 AM UTC

Hi @Suzuki,

Thanks for the update here.

Please do keep us updated about this and if you’re stuck we’re happy to help further!