Skip to main content
Solved

Mail Number Format

  • October 12, 2021
  • 5 replies
  • 105 views

gonzalo9

Hello !

I have a mail template with the Pedido ID (numeric)… how can I set de format of the number?,.. without decimals.. in the mail template? 

Best answer by genietim

Sure. To setup a short text field with custom validation, follow the screenshot below:

 

 

The interesting question for you will be what to use as input in the “Custom validation” field.

I cannot give you a definitive answer without knowing the format of your ID.

Examples include:

  • 1.: only digits, at least one: “^[0-9]+$”
  • 2.: only digits, exactly 5: “^[0-9]{5}$”
  • 3.: only digits, 5 or more: “^[0-9]{5}[0-9]*$”
  • 4.: only digits, any nr.: “^[0-9]*$”

 

If you want to know more about what each character does in the RegEx, or want to test them on your inputs, checkout e.g. https://regex101.com/

View original
Did this topic help you find an answer to your question?

5 replies

Sarah Lane
Forum|alt.badge.img+6
  • Inspiring
  • 126 replies
  • October 12, 2021

Hi @gonzalo9 ! I don’t know the answer to your question, but I’m guessing it might be possible with a bit of coding. @genietim is a wiz with coding so he might be able to help you.


genietim
Forum|alt.badge.img+12
  • Pipefy Legend
  • 412 replies
  • October 12, 2021

Hi @gonzalo9 and @Sarah Lane 

 

While I do love coding and might use it a bit too preemptively, the E-Mail templates in Pipefy unfortunately do not offer too many possiblitiy to do so. The E-Mail templates in Pipefy have only HTML & CSS support, meaning, markup and style, and no programmatic way to actually change the content. The field values that Pipefy injects are text only and they do not (yet) provide any way to manipulate it.

Now, to your actual problem: if I understand correctly, you have a numeric field in Pipefy and want the field value in the template to be without decimal digits?

Then, the only two ways I can think of right now are:

  • 1. use a text field with custom (numeric) validation instead of the numeric field
  • 2. hack: use css to have a small div with the background color overlapping exactly the width of the decimal digits

 

Tell me if you need more details on one of the solutions.

Best regards,

 

Tim


gonzalo9
  • Author
  • New Member
  • 11 replies
  • October 12, 2021

Hi Tim, thanks

If you have more details how to implement the first options will be greats.

best regards

 


genietim
Forum|alt.badge.img+12
  • Pipefy Legend
  • 412 replies
  • Answer
  • October 13, 2021

Sure. To setup a short text field with custom validation, follow the screenshot below:

 

 

The interesting question for you will be what to use as input in the “Custom validation” field.

I cannot give you a definitive answer without knowing the format of your ID.

Examples include:

  • 1.: only digits, at least one: “^[0-9]+$”
  • 2.: only digits, exactly 5: “^[0-9]{5}$”
  • 3.: only digits, 5 or more: “^[0-9]{5}[0-9]*$”
  • 4.: only digits, any nr.: “^[0-9]*$”

 

If you want to know more about what each character does in the RegEx, or want to test them on your inputs, checkout e.g. https://regex101.com/


gonzalo9
  • Author
  • New Member
  • 11 replies
  • October 16, 2021

greats!! thanks thanks & thanks. :relaxed:


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings