# Silly question - Dynamic Components

**URL:** <https://forums.sketchup.com/t/silly-question-dynamic-components/143885>\
**Category:** Dynamic Components\
**Tags:** dynamiccomponents\
**Created:** [November 26, 2020, 2:21am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885 "2020-11-26T02:21:41Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichardJeffrey](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RichardJeffrey](https://forums.sketchup.com/u/RichardJeffrey)\
**Post date:** [November 26, 2020, 2:21am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/1 "2020-11-26T02:21:41Z")

</div>

How do I write in:

=IF(A has any value at all meaning characters or numbers,make it this?

---

<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:** [November 26, 2020, 4:02am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/2 "2020-11-26T04:02:31Z")

</div>

=IF(A=“”,“”,“put desired result here”)

 ![Screen Shot 2020-11-25 at 11.00.54 PM](https://global.discourse-cdn.com/sketchup/original/3X/7/1/719f1ee38a8b2d8e3994ed6a21cc7cde9b5518ac.png)

---

<div class="post-metadata">

**Author:** ![RichardJeffrey](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RichardJeffrey](https://forums.sketchup.com/u/RichardJeffrey)\
**Post date:** [November 26, 2020, 6:24am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/3 "2020-11-26T06:24:32Z")

</div>

Big thanks mate! I just can’t get this string to work! ☹

This is what I’m trying to do:

If A & B have no values: display as Red  
If A & B both have values: display as Red  
If A only has a value display as Green  
If B only has a value display as Grey

I’ve been trying for hours and can’t get the required results!

---

<div class="post-metadata">

**Author:** ![Wo3Dan](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/wo3dan/32/7450_2.png) [@Wo3Dan](https://forums.sketchup.com/u/Wo3Dan)\
**Post date:** [November 26, 2020, 9:01am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/4 "2020-11-26T09:01:57Z")

</div>

Have you tried stichting multiple **IF** statements together by **;** in one sentence.  
IF … ; IF …

---

<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:** [November 26, 2020, 9:39am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/5 "2020-11-26T09:39:05Z")

</div>

[logic test.skp](https://forums.sketchup.com/uploads/short-url/5lEe5aIRLFMpE9XwV8vI1YH0mV7.skp) (23.1 KB)

is display the object material or an option attribute color?  
@Wo3Dan answer inspired the add up after checking if his suggestion would work.

---

<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:** [November 26, 2020, 4:08pm UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/6 "2020-11-26T16:08:58Z")

</div>

Seems Sketchup reads a blank cell as an error. You need to start with a zero or some other value in the attributes box to get it to work. Try this one.[Like This?.skp](https://forums.sketchup.com/uploads/short-url/r4l42AJvq2o7seTYGd66mWwgF2Q.skp) (19.3 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:** [November 26, 2020, 4:14pm UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/7 "2020-11-26T16:14:32Z")

</div>

![Screen Shot 2020-11-26 at 11.14.16 AM](https://global.discourse-cdn.com/sketchup/original/3X/8/f/8f5170f850ef5be8c22104a904cb1aff64f3f677.jpeg) ![Screen Shot 2020-11-26 at 1.40.25 PM](https://global.discourse-cdn.com/sketchup/original/3X/8/c/8c2c5b56010744d09d4e03d01af4f74ac4f4791b.jpeg)

---

<div class="post-metadata">

**Author:** ![RichardJeffrey](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RichardJeffrey](https://forums.sketchup.com/u/RichardJeffrey)\
**Post date:** [November 27, 2020, 12:51am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/8 "2020-11-27T00:51:28Z")

</div>

Yes, trying that now, but its a bit of an issue as Ryan points out Sketchup returns an error if the cell is empty!

---

<div class="post-metadata">

**Author:** ![RichardJeffrey](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RichardJeffrey](https://forums.sketchup.com/u/RichardJeffrey)\
**Post date:** [November 27, 2020, 3:17am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/9 "2020-11-27T03:17:00Z")

</div>

> [@pcmoor](#):
>
> is display the object material or an option attribute color?  
> @Wo3Dan answer inspired the add up after checking if his suggestion would work.

Yeah, I did trial this idea, though the issue is that if there is a number already in the dialogue it overcomes the need to have the red alert! The alert was to say the component has no yet been numbered.

---

<div class="post-metadata">

**Author:** ![RichardJeffrey](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RichardJeffrey](https://forums.sketchup.com/u/RichardJeffrey)\
**Post date:** [November 27, 2020, 3:24am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/10 "2020-11-27T03:24:25Z")

</div>

> [@ryan.moore](#):
>
> Seems Sketchup reads a blank cell as an error. You need to start with a zero or some other value in the attributes box to get it to work.

Yeah, that was obviously what I was getting yesterday! However, in regards to your solution, the red was to alert that the component hadn’t been numbered, or had been numbered when the component had already responded as being standard.

We have around 200 of the same component in a home with varied modifications, and they need to be numbered sequentially (excepting where one of four standards). If a panel is skipped during the numbering all hell can break loose!

Big thanks for help though!

---

<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:** [November 27, 2020, 11:01pm UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/11 "2020-11-27T23:01:38Z")

</div>

With the DCs should you not use the instance name as the labeling? then you can see in outliner (any out of order or missed) and the option dialog if “Name” attribute not used, or connection broken) or in the report any discrepancies.  
Further to this you could create a ruby script to go through a selection and highlight any faults

I suggest you change the title of your post to something more on topic, its certainly not silly!

---

<div class="post-metadata">

**Author:** ![RichardJeffrey](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RichardJeffrey](https://forums.sketchup.com/u/RichardJeffrey)\
**Post date:** [November 30, 2020, 6:12am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/12 "2020-11-30T06:12:07Z")

</div>

> [@pcmoor](#):
>
> With the DCs should you not use the instance name as the labeling? then you can see in outliner (any out of order or missed) and the option dialog if “Name” attribute not used, or connection broken) or in the report any discrepancies.

Thanks mate, that’s not a bad option!!!

Though it does become problematic unless the instance name can be generated by the DC!

In the case below, STANDARD HEIGHT PANEL resolves to (in this case) E27 only when all parameters are consistent with a standard panel (for your info these are just pressed and require no further mods). As soon as a panel is modified in any way to make it non-standard only then the panel requires numbering

 ![Untitled-1](https://global.discourse-cdn.com/sketchup/original/3X/4/8/4826614d452071a0d9933871cf110846ca8c825a.jpeg)

---

<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:** [November 30, 2020, 9:52am UTC](https://forums.sketchup.com/t/silly-question-dynamic-components/143885/13 "2020-11-30T09:52:41Z")

</div>

If you have an attribute that generates the standard notation, then a script can read and place it in the instance name. For other notation it may add a number/code to suit, If you private message your DC (as likely its confidential) I can look at it and see if I can create a work flow and script to suit.
