# Fill-in item - if data Path is blanc

**URL:** <https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [April 28, 2023, 9:27am UTC](https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083 "2023-04-28T09:27:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GH-KN](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gh-kn/32/651662_2.png) [@GH-KN](https://discourse.mcneel.com/u/GH-KN)\
**Post date:** [April 28, 2023, 9:27am UTC](https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083/1 "2023-04-28T09:27:20Z")

</div>

Question: There is a data tree with several branches.  
I would like to ‘insert’ data into the branches which are ‘blank’

Any suggestion?

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/8/4/184b56e6ba70b9cfec737c00a0479db588754026.png)  
[2023-04-28 Fill-in items - only in blanc - Paths.gh](https://discourse.mcneel.com/uploads/short-url/pYTE90ToxYUZEF0yGwmfrQZgaZN.gh) (4.9 KB)

Many thanks

---

<div class="post-metadata">

**Author:** ![HS\_Kim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hs_kim/32/473975_2.png) [@HS\_Kim](https://discourse.mcneel.com/u/HS_Kim)\
**Post date:** [April 28, 2023, 9:50am UTC](https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083/2 "2023-04-28T09:50:12Z")

</div>

![Canvas at 18;49;03](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/8/e/f8e254b0e1500dea574d5fda6b1f1eb9f0c5f8a7.png)  
[2023-04-28 Fill-in items - only in blanc - Paths\_re.gh](https://discourse.mcneel.com/uploads/short-url/wbp1oVnVAHcNEFqHFswmP7ITu3R.gh) (12.7 KB)

---

<div class="post-metadata">

**Author:** ![GH-KN](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gh-kn/32/651662_2.png) [@GH-KN](https://discourse.mcneel.com/u/GH-KN)\
**Post date:** [April 28, 2023, 9:56am UTC](https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083/3 "2023-04-28T09:56:52Z")

</div>

Hi Kim,

Thanks!  
This works indeed.  
However my gut feeling would say that there is a more straight forward manner?

like ‘insert’ item at 0, hereafter select only the ‘Last’ item.  
unfortunately the ‘insert’ component does not word when a Path is fully blanc.

Anny suggestion to keep this action quit small/direct? 🙂

---

<div class="post-metadata">

**Author:** ![magicteddy](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@magicteddy](https://discourse.mcneel.com/u/magicteddy)\
**Post date:** [April 28, 2023, 10:38am UTC](https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083/4 "2023-04-28T10:38:19Z")

</div>

I’ve got a three boxes solution with `Weave`.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/2/5/1259242360776bc75a9faa84bc2b6741f8d49415.png)

[Weave.gh](https://discourse.mcneel.com/uploads/short-url/bG80rzmfWta2HC1tXydlLR55tjx.gh) (10.3 KB)

---

<div class="post-metadata">

**Author:** ![ThomasE](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/thomase/32/516431_2.png) [@ThomasE](https://discourse.mcneel.com/u/ThomasE)\
**Post date:** [April 28, 2023, 11:33am UTC](https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083/5 "2023-04-28T11:33:31Z")

</div>

> [@TRICK: Insert \<Null\> into an empty branch](https://discourse.mcneel.com/t/trick-insert-null-into-an-empty-branch/81405):
>
> The classic insert NULL question by simply adding Combine Data.

use this trick with Combine to add null and then Replace null.

---

<div class="post-metadata">

**Author:** ![Intuos](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/intuos/32/757591_2.png) [@Intuos](https://discourse.mcneel.com/u/Intuos)\
**Post date:** [December 11, 2025, 12:23pm UTC](https://discourse.mcneel.com/t/fill-in-item-if-data-path-is-blanc/159083/6 "2025-12-11T12:23:47Z")

</div>

There is a simpler solution for this:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/c/9/ac9ffd2b5c4b6b7ff21c638b150a6e84a61781d5.png)  
[Insert item in empty branch.gh](https://discourse.mcneel.com/uploads/short-url/8truCKtG2OendUW9HbwH3PbXh4i.gh) (24.3 KB)
