# Variables shadow block gone in toolbox after changing to NPM PXT-Blockly

**URL:** https://forum.makecode.com/t/variables-shadow-block-gone-in-toolbox-after-changing-to-npm-pxt-blockly/1900
**Category:** PXT
**Created:** [April 30, 2020, 5:47pm UTC](https://forum.makecode.com/t/variables-shadow-block-gone-in-toolbox-after-changing-to-npm-pxt-blockly/1900 "2020-04-30T17:47:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![JoshuaLowe1002](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/joshualowe1002/32/891_2.png) [@JoshuaLowe1002](https://forum.makecode.com/u/JoshuaLowe1002)
#### Post date: [April 30, 2020, 5:47pm UTC](https://forum.makecode.com/t/variables-shadow-block-gone-in-toolbox-after-changing-to-npm-pxt-blockly/1900/1 "2020-04-30T17:47:18Z")

</div>

I’ve switched over to using NPM PXT-Blockly.

I’ve got some custom variable blocks for blockly of which are working fine with the create variable button apart from one feature.  
For some reason the shadow block of which I am trying to place within the input of the “variables\_set” block doesn’t show. I think this is because I’m declaring it within a toolbox file. Is there something else I need to do for that shadow block to appear?

Code:

Definition -

```
Blockly.Blocks['variables_set'] = {
    init: function() {
      this.appendDummyInput()
        .appendField(new Blockly.FieldVariable(""), "VAR")
        .appendField(new Blockly.FieldDropdown([['=', '='], ['+=', '+='], ["-=", "-="]]), 'NAME')
      this.appendValueInput("varset")
        .setCheck(null);
      this.setInputsInline(true);
      this.setPreviousStatement(true, null);
      this.setNextStatement(true, null);
      this.setColour("#0000CD");
      this.setTooltip("assign a value, increment, or decrement a variable");
      this.setHelpUrl("");
    }
  };

```

Generator -

```
Blockly.Python['variables_set'] = function(block) {
    var variable_name = Blockly.Python.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE);
    var text_text = block.getFieldValue('NAME');
    var value_name = Blockly.Python.valueToCode(block, 'varset', Blockly.Python.ORDER_ATOMIC);
    // TODO: Assemble Python into code variable.
    var code = variable_name + ' ' +text_text+ ' ' +value_name+ '\n';
    return code;
  };

```

Toolbox -

```
<block type="variables_set">
    <value name="varset">
      <shadow type="textinline">
        <field name="text">0</field>
      </shadow>
    </value>
  </block>

```

Does anyone know what I need to do to fix it?
