# Help Formatting a field

**URL:** <https://forum.novacura.com/t/help-formatting-a-field/914>\
**Category:** Flow Classic\
**Created:** [March 27, 2025, 9:20pm UTC](https://forum.novacura.com/t/help-formatting-a-field/914 "2025-03-27T21:20:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshaya](https://avatars.discourse-cdn.com/v4/letter/a/7C9FD7/32.png) [@Akshaya](https://forum.novacura.com/u/Akshaya)\
**Post date:** [March 27, 2025, 9:20pm UTC](https://forum.novacura.com/t/help-formatting-a-field/914/1 "2025-03-27T21:20:15Z")

</div>

I’m new to Novacura and could use some help with formatting a field.

I have two variables:

- `serial_no` (Numeric Variable)
- `counter` (Numeric input from the user)

I need to store the `serial_no` in another variable, formatted based on the length of the `counter`. Here are a few examples of what I’m trying to achieve:

- If `counter` is 100 and `serial_no` is 1, I want the result to be `001`.
- If `counter` is 9 and `serial_no` is 9, I want the result to be `9`.
- If `counter` is 9999 and `serial_no` is 8, I want the result to be `0008`.

I’ve tried using a script, but it didn’t work as expected. Can someone guide me on how to properly format this?  
If possible, send me a screenshot, please.

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![ivstde](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/ivstde/32/146_2.png) [@ivstde](https://forum.novacura.com/u/ivstde)\
**Post date:** [March 28, 2025, 7:34am UTC](https://forum.novacura.com/t/help-formatting-a-field/914/2 "2025-03-28T07:34:54Z")

</div>

Hi,

this should do it:

 ![grafik](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/7af82f3947ddc45995a4229337eebc5eff7bcee8.png)

Hope this helps!

B R  
Ivan  
[Test Print Serial increment2.flow](https://forum.novacura.com/uploads/short-url/1Xl0GBhzL8Lf8ORMfOPQh6tIxDP.flow) (27.0 KB)
