title: Robot Framework - How to use Global Variable for different keywords
body: <p>I have this problem where I need to make a variable accessible from different keywords</p>
  
  <p>I have Tried to use <code>set global variable</code> Keyword.</p>
  
  <pre><code>***Keywords***
  
  Random Name
      ${Name}=  Full Name
      set global variable  ${Name}
  
  Keyword Name
      Random Name
      Log  ${Name}
  
  Keyword Name2
      Random Name
      Log  ${Name}
  
  
  *** Test Cases ***
  Run Keywords
      Keyword Name
      Keyword Name2
  </code></pre>
  
  <p>Full Name Keyword</p>
  
  <pre><code>Import names
  
  def Full_Name(self):
  
      return (names.get_first_name())
  </code></pre>
  
  <p>Output</p>
  
  <p><a href="https://i.stack.imgur.com/hHJHT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hHJHT.png" alt="enter image description here"></a></p>
  
  <p>So in Keyword Name The value I am getting is <code>John</code>, but in Keyword Name2 The value is <code>Clair</code>. I need to keep the value as <code>John</code> for all of the keywords.</p>
  
  <p>When i try to use the variable without passing the Keyword into the keyword I am not able to access it all.</p>
  
  <p>I also Tried to use <code>set suite variable</code> but that has the Same Result.</p>
  
  <p>Note: Full Name keyword is a custom library to get random names. also this is only a example code</p>