Answers.Body: <p>Using variables is probably a better solution, but you can pass data wires into a switch block if it is tabbed view. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-10T20:54:01.787Z
Answers.LastActivityDate: 2019-03-10T20:54:01.787Z
Answers.UserDisplayName: SeanMaths4EAL
Answers.Body: <p>To get technical, this thing (pictured below) is a "parameter", not a "variable".</p>
  
  <p><a href="https://i.sstatic.net/xtqCM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xtqCM.png" alt="screenshot of my block parameter"></a></p>
  
  <p>"Variables" look like this:</p>
  
  <p><a href="https://i.sstatic.net/Mpfn0.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Mpfn0.png" alt="enter image description here"></a></p>
  
  <p>You can use a data wire to write the parameter value to a variable <em>before</em> the switch block and then read the variable inside of the nested switch blocks. Something like this...</p>
  
  <p><a href="https://i.sstatic.net/8bAqD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8bAqD.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-04T23:56:35.650Z
Answers.LastActivityDate: 2019-03-04T23:56:35.650Z
Answers.UserDisplayName: David Lechner
Body: <p>I have a problem when connecting the variable (from the create a block) to a variable in the function because it's inside a switch. How can I link them?
  <a href="https://i.sstatic.net/4oxOy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4oxOy.png" alt="enter image description here"></a></p>
  
  <p>I want to connect the variable to each (20) in the motor blocks</p>
  
Tags: <ev3><programming><motor>
Title: Can't link variable inside a switch when creating a new block
UserDisplayName: Ryuk
ThreadText: # Can't link variable inside a switch when creating a new block
  
  (Asked by: username_0 on 2019-03-02)
  
  I have a problem when connecting the variable (from the create a block) to a variable in the function because it's inside a switch. How can I link them?
  [![enter image description here](https://i.sstatic.net/4oxOy.png)](https://i.sstatic.net/4oxOy.png)
  
  I want to connect the variable to each (20) in the motor blocks
  
  **Tags:** ev3, programming, motor
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-03-10. Score: 2
  
  Using variables is probably a better solution, but you can pass data wires into a switch block if it is tabbed view.
  
  
  ---
  
  ### Answer by username_2 on 2019-03-04. Score: 1
  
  To get technical, this thing (pictured below) is a "parameter", not a "variable".
  
  [![screenshot of my block parameter](https://i.sstatic.net/xtqCM.png)](https://i.sstatic.net/xtqCM.png)
  
  "Variables" look like this:
  
  [![enter image description here](https://i.sstatic.net/Mpfn0.png)](https://i.sstatic.net/Mpfn0.png)
  
  You can use a data wire to write the parameter value to a variable *before* the switch block and then read the variable inside of the nested switch blocks. Something like this...
  
  [![enter image description here](https://i.sstatic.net/8bAqD.png)](https://i.sstatic.net/8bAqD.png)
  
  
  ---
  
  