Best answer

How to remove a letter in a specific position?

  • 13 April 2023
  • 5 replies
  • 105 views

Hello guys!

I Have a poblem here. I have a number that has 13 letters. The format is like that “5514925563223”.Whats I need to do is remove the 5 letters, in this case, the number 9, to look like “551425563223”.

How can I do so?

icon

Best answer by ken.a 13 April 2023, 19:26

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.

5 replies

Userlevel 3
Badge +4

Hi @João Andrade 

Thanks for reaching out to the Community!

To ensure I understand, could you elaborate more on the issue? If you can phrase it in the “When A happens in Service X, B should happen in Service Y” format, that’ll help me make sure I give you the best suggestion possible.

I want to ensure we’re on the same page so I can point you in the right direction.

Looking forward to your response!

Sure!

 

When a number has 13 characters, it will delete the 5th caracther.

 

Input: 5514925563223

Output: 551425563223

Userlevel 7
Badge +6

Hey there @João Andrade,

I’m jumping here to see if I can help!

I did some digging into this, and it seems like we can use Code by Zapier (Run Javascript) to achieve this workflow:

Here’s the code that you can try:

// Assuming your input is in the input field named "input_number"

var input_number = inputData.input_number;

var output_number = input_number.slice(0, 4) + input_number.slice(5);

// The result will be in the output field named "output_number"

return {output_number: output_number};

 

Here’s that in action:

70ea36daf0aa4867dce97d756573dcc1.gif
(view larger)

Hopefully, this helps! 😊

Hey there @João Andrade,

I’m jumping here to see if I can help!

I did some digging into this, and it seems like we can use Code by Zapier (Run Javascript) to achieve this workflow:

Here’s the code that you can try:

// Assuming your input is in the input field named "input_number" var input_number = inputData.input_number; var output_number = input_number.slice(0, 4) + input_number.slice(5);

// The result will be in the output field named "output_number" return {output_number: output_number};
 

Here’s that in action:

70ea36daf0aa4867dce97d756573dcc1.gif
(view larger)

Hopefully, this helps! 😊

 

Thank you very much!

 

It worked perfectly!! You are a life savior.

Userlevel 3
Badge +4

Hi @João Andrade 

It’s great that you got it to work!

Feel free to reach out to us if you have other questions. 😊