title: How to retrieve value in selected SharePoint list item column
body: <p>In a SharePoint list, I have a column that holds a foreign key ID to another list. For example:</p>
  
  <ul>
  <li>list <strong>teachers</strong></li>
  <li>list <strong>classes</strong> with foreign key column <strong>teacherID</strong> to teacher item</li>
  </ul>
  
  <p>I am trying to create a Power Automate flow that starts with a SharePoint "For a selected item" in <strong>classes</strong> and then modifies the referenced <strong>teacher</strong> list item.</p>
  
  <ol>
  <li>"For selected item" in <strong>classes</strong></li>
  <li>Modify <strong>teachers</strong> item referenced by classes.<strong>teacherID</strong></li>
  </ol>
  
  <p>All(!) I need to do is get the value of <strong>teacherID</strong>, but that has turned out to be incredibly difficult. How can I do this? I'm new to Power Automate so any suggestions appreciated.</p>
  
  <p>What I've tried:</p>
  
  <ul>
  <li><p>Created a second action to email me output from the first action (because I don't know any other way to "debug" or "watch" this). Added many different types of Dynamic content and expressions to the email body. <strong>teacherID</strong> never appears. It is not in the list of Dynamic content fields. I cannot find in expressions tried e.g. <code>triggerBody</code>, <code>trigger</code>, <code>output</code>, <code>actions('For a selected item')</code> (which is an error for some unknown reason but I'm not trying to understand why at the moment). In the JSON, all I have been able to retrieve so far is <code>ID</code>, <code>itemURL</code>, <code>fileName</code>, <code>FileId</code> (which looks the same as ID).</p></li>
  <li><p>My next thought was, okay, maybe "For a selected item" doesn't have access to the other list columns, but maybe "Get item" does. So, I inserted a "Get item" (singular, not "Get item<em>s</em>) but this frustratingly did not make any difference.</p></li>
  </ul>
  
  <p>What I am trying to do should be very simple and straightforward. The documentation is sparse, and it sucks TBH.</p>