# Custom block both with and without %blockSetVariable?

**URL:** https://forum.makecode.com/t/custom-block-both-with-and-without-blocksetvariable/159
**Category:** Arcade
**Created:** [May 8, 2019, 3:03pm UTC](https://forum.makecode.com/t/custom-block-both-with-and-without-blocksetvariable/159 "2019-05-08T15:03:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@paul](https://forum.makecode.com/u/paul)
#### Post date: [May 8, 2019, 3:03pm UTC](https://forum.makecode.com/t/custom-block-both-with-and-without-blocksetvariable/159/1 "2019-05-08T15:03:47Z")

</div>

Say you have a method

```
class Foo {
    //%block="create a Foo"
    //%blockSetVariable=foo
    static Foo create() {
        return new Foo()
    }
}

```

this will produce a block which calls the method and stores the result. Inside the block, will be a capsule-shaped block which represents just the result of the method.

If instead, you define this:

```
class Foo {
    //%block="create a Foo"
    static Foo create() {
        return new Foo()
    }
}

```

You get just the capsule shaped ‘value’ block.

How do you use the %block annotations to have both of these things? Is it necessary to create a separate little function just in order to have two different sets of %block annotations?

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [May 9, 2019, 4:53pm UTC](https://forum.makecode.com/t/custom-block-both-with-and-without-blocksetvariable/159/2 "2019-05-09T16:53:40Z")

</div>

Having both is not really supported right now.
