title: Sharepoint Online - Lookup field - Client side rendering
body: <p>Essentially we are looking to use lookup values in a calculated column from another list called episodes in a list called workbook.</p>
  <p>We could run scheduled list workflows using this -</p>
  <p><a href="https://plumsail.com/workflow-actions-pack/" rel="nofollow noreferrer">https://plumsail.com/workflow-actions-pack/</a></p>
  <p>Or getting someone to write a timer job.</p>
  <p>I didn't really like these solutions and wanted something more dynamic then found this:</p>
  <p><a href="https://sharepoint.stackexchange.com/questions/128479/lookup-column-in-calculated-column-formula">https://sharepoint.stackexchange.com/questions/128479/lookup-column-in-calculated-column-formula</a></p>
  <p>Great Little hackaround by Danny. But struggled with re-purposing the code to see if i could get it show a lookup value from the list called episode.</p>
  <p>Dannys code:</p>
  <pre><code>=&quot; &lt;img src=&quot;&quot;/_layouts/images/blank.gif&quot;&quot; onload=&quot;&quot;{&quot;
      &amp;&quot;var TR=this.parentNode.parentNode.parentNode,&quot;
      &amp;&quot;    item=ctx.ListData.Row[TR.rowIndex-1],&quot;
      &amp;&quot;    discount=item.Vendor_x003a_Discount,&quot;
      &amp;&quot;    price=item['Price.'];&quot;
      &amp;&quot;console.log(discount,price,item);&quot;
      &amp;&quot;this.parentNode.innerHTML=discount*price;&quot;
  &amp;&quot;}&quot;&quot;&gt;&quot;
  </code></pre>
  <p>My Botched Version:</p>
  <pre><code>=&quot; &lt;img src=&quot;&quot;/_layouts/images/blank.gif&quot;&quot; onload=&quot;&quot;{&quot;
    &amp;&quot;var TR=this.parentNode.parentNode.parentNode,&quot;
    &amp;&quot;item=ctx.ListData.Row[TR.rowIndex-1],&quot;
    &amp;&quot;deact=item.epslook_x003a_DeActTime,&quot;
    &amp;&quot;console.log(deact,item);&quot;
    &amp;&quot;this.parentNode.innerHTML=deact;}&quot;&quot;&gt;&quot;
  </code></pre>
  <p>Tried the lookup name in workbook epslook:deActTime and episode:deActTime.</p>
  <p>Where am I going wrong?</p>