# Dynamic component leading 0 in formula

**URL:** <https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032>\
**Category:** Dynamic Components\
**Tags:** dynamic-component\
**Created:** [June 30, 2026, 12:48pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032 "2026-06-30T12:48:34Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lowkey](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lowkey](https://forums.sketchup.com/u/Lowkey)\
**Post date:** [June 30, 2026, 12:48pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/1 "2026-06-30T12:48:34Z")

</div>

Hello everyone,  
I would like the leading 0 to appear in the value field. the zer doesn’t appear if placed inside a function.  
desired output =\>060&length  
your help is much appreciated

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/1/1/f/11f541261a477e5319f72e4e3f7756ef220eff0a.png)

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/0/7/d/07d9b65aaa6ea16bada25dd96d3957de1f72a9ff.png)

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/e/2/9/e29ae5084c018753424dfc28a7e9125b5fedc07a.png)

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [June 30, 2026, 12:51pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/2 "2026-06-30T12:51:26Z")

</div>

Try using =CONCATENATE(“0”,length," length")

---

<div class="post-metadata">

**Author:** ![Lowkey](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lowkey](https://forums.sketchup.com/u/Lowkey)\
**Post date:** [June 30, 2026, 12:59pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/3 "2026-06-30T12:59:06Z")

</div>

> [@ryan.moore](#):
>
> =CONCATENATE(“0”,length," length")

doesn’t solve the problem  
=CONCATENATE(“0”,6)&length  
=CONCATENATE(“0”,length," length")

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [June 30, 2026, 1:10pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/4 "2026-06-30T13:10:07Z")

</div>

Can you share the component?

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [June 30, 2026, 1:12pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/5 "2026-06-30T13:12:30Z")

</div>

Is this the desired output?

 ![Screen Shot 2026-06-30 at 9.11.15 AM](https://global.discourse-cdn.com/sketchup/original/4X/c/3/3/c33af786f733a10414a4e6ad40dd644ce460b164.jpeg)

 ![Screen Shot 2026-06-30 at 9.11.29 AM](https://global.discourse-cdn.com/sketchup/original/4X/1/3/3/133bed6e8457a2e79f63ca2ef3714282c695d30e.jpeg)

---

<div class="post-metadata">

**Author:** ![Lowkey](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lowkey](https://forums.sketchup.com/u/Lowkey)\
**Post date:** [June 30, 2026, 1:39pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/6 "2026-06-30T13:39:18Z")

</div>

[test.skp](https://forums.sketchup.com/uploads/short-url/9I1X3Icz1hA9e0YanleZz6JkvZP.skp) (184.6 KB)  
desired outpust is 06&length  
length follows the attribute value

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [June 30, 2026, 1:46pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/7 "2026-06-30T13:46:59Z")

</div>

Like this?

[test modified.skp](https://forums.sketchup.com/uploads/short-url/rcQd6SYwYpzj3tm3onurQHltING.skp) (181.4 KB)

 ![Screen Shot 2026-06-30 at 9.47.25 AM](https://global.discourse-cdn.com/sketchup/original/4X/e/5/6/e567dd860aea7e5e896ff9fe09fdfcabcee3f2d5.jpeg)

---

<div class="post-metadata">

**Author:** ![Lowkey](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lowkey](https://forums.sketchup.com/u/Lowkey)\
**Post date:** [June 30, 2026, 2:17pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/8 "2026-06-30T14:17:34Z")

</div>

unfortunetely not,  
now is the ouput =\> 05&length  
desired output is =\> 060&length  
length is an attribute with value and not a string

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/9/d/b/9dbc9d71c6f7063464611d21876d3d7422072ffc.png)

---

<div class="post-metadata">

**Author:** ![d13tz](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@d13tz](https://forums.sketchup.com/u/d13tz)\
**Post date:** [June 30, 2026, 2:40pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/9 "2026-06-30T14:40:29Z")

</div>

If you put a space before the zero, the zero will show up. There is a space in front of it, though, if that’s an issue.

=" 060"&length

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/3/8/6/38605f28345d7b6bc5359b721dbc1c5c4309aa14.png)

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [June 30, 2026, 2:45pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/10 "2026-06-30T14:45:41Z")

</div>

> [@Lowkey](#):
>
> desired outpust is 06&length

Was following your request. The length you have highlighted in the screen shot is 50 not 60. When I change the length to 60mm in the options panel and change the formula to **=CONCATENATE(“0”,length,“&length”)**, it gives you what you want, I think?

Last try before I have to go do some stuff:

[test modified.skp](https://forums.sketchup.com/uploads/short-url/1n0xQXyTfkvdUpHjFZGKDridMiM.skp) (186.1 KB)

 ![Screen Shot 2026-06-30 at 10.40.36 AM](https://global.discourse-cdn.com/sketchup/original/4X/e/3/b/e3baa4f9016f56110b2bd6022aa30e9270e9f02f.jpeg)

---

<div class="post-metadata">

**Author:** ![Lowkey](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lowkey](https://forums.sketchup.com/u/Lowkey)\
**Post date:** [July 1, 2026, 9:45am UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/11 "2026-07-01T09:45:53Z")

</div>

Thanks for following up on this  
the leading zero has to appear without a space or other symbol

the formula =CONCATENATE(“060”,length) returns 6060 instead of 06060.

In otherwords, I don’t want the “length” to apprear as a string but returns its attribute value

is there a way that sketchup takes the leading zero when put in a formula? I know the leading zero appears when placed without a formula

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/4/5/5/455f796c8485b02afb59a79367c53d1b9dbb07a7.png)

![image](https://global.discourse-cdn.com/sketchup/original/4X/6/f/4/6f43dda80b1cd13d5a38e9687e8d82c4780054b6.png)

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/4/3/6/43679ac42227a46b9a4e8a3d421904c5b3efca44.png)

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [July 1, 2026, 1:21pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/12 "2026-07-01T13:21:44Z")

</div>

OK I see what you are seeing now, thanks for clarifying. How is the value used? Why does it need a leading 0? It would help to understand more about your specific use case and how the value is used afterwards.

I don’t think there is a way to force SketchUp to add a leading 0 to a number. The only way to make it appear the way you want it to is with a text string. In the attached file I added a trailing space to get the text string to appear as you want. Below that cell I use the Value() function to convert it back into a number if it needs to be used in a calculation somewhere else.

[test modified v3.skp](https://forums.sketchup.com/uploads/short-url/kOIyQjkI8teOmkH1tsI4gp5fM4S.skp) (179.9 KB)

---

<div class="post-metadata">

**Author:** ![Lowkey](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@Lowkey](https://forums.sketchup.com/u/Lowkey)\
**Post date:** [July 1, 2026, 1:30pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/13 "2026-07-01T13:30:28Z")

</div>

Hello Ryan  
the formula attached is not recognized in sketchup.  
The leading zero is needed without a space to create a product code which will be exported to CSV and the CSV is uploaded to a MRP. so the exported code has to excatly match the correct code.

 ![image](https://global.discourse-cdn.com/sketchup/original/4X/8/f/e/8feb4861b4f11898a8cfe3f59288033b724b9aee.png)

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [July 1, 2026, 10:08pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/14 "2026-07-01T22:08:16Z")

</div>

For my work flow I run an excel macro to import the generate report csv file. With the macro I’lI adjust formatting to suit my needs, could you do it on the excel side perhaps?

---

<div class="post-metadata">

**Author:** ![pcmoor](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/pcmoor/32/3427_2.png) [@pcmoor](https://forums.sketchup.com/u/pcmoor)\
**Post date:** [July 1, 2026, 10:45pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/15 "2026-07-01T22:45:07Z")

</div>

If you place the sizes as a dropdown with space, then there is no conversion of text to number  
[by pass the value function.skp](https://forums.sketchup.com/uploads/short-url/rkYTRdusg0aMfShwNQqd0zEZBqD.skp) (22.6 KB)

EDIT: Same as space before. Not a solution

---

<div class="post-metadata">

**Author:** ![pcmoor](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/pcmoor/32/3427_2.png) [@pcmoor](https://forums.sketchup.com/u/pcmoor)\
**Post date:** [July 2, 2026, 3:01am UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/16 "2026-07-02T03:01:31Z")

</div>

placing the code in the values of a dropdown, with NO equation (=), shows as text. So can pass through to CSV  
so A4SU\_inventsizeid is the dropdown  
length reads the dropdown result in part

[test.skp](https://forums.sketchup.com/uploads/short-url/b8UBkPWBXK6VzQbJpmJ8F8ctW9f.skp) (185.6 KB)

---

<div class="post-metadata">

**Author:** ![ryan.moore](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/ryan.moore/32/106089_2.png) [@ryan.moore](https://forums.sketchup.com/u/ryan.moore)\
**Post date:** [July 2, 2026, 8:37pm UTC](https://forums.sketchup.com/t/dynamic-component-leading-0-in-formula/348032/17 "2026-07-02T20:37:58Z")

</div>

Oh sorry, that was something completely different I was working on. 😳 I changed the file attachment above. Did you try what Philip suggested?
