I am trying to combine rows from two tables into one depending if they have values present in either column’s
Table ID: “Macro”
$Alert_Expiry
$TD_expected_Date
Table ID: “Watchlist_Tickers2”
$Alert_Expiry
$Potential_Entry_Date
It works and parses the appropriate rows from “Watchlist_Tickers2” but fails to parse from the table “Macro“
I have checked that the column and table ID’s are spelt correctly and I have tried just parsing “Macro“ on its own.
I am new too Grist and python so I don’t know where to start debugging. Any suggestions?
if $Source_Table == 'Watchlist Tickers':
return Watchlist_Tickers2.lookupOne(id=$id).Potential_Entry_Date or Watchlist_Tickers2.lookupOne(id=$id).Alert_Expiry
elif $Source_Table == 'Macro':
return Macro.lookupOne(id=$id).TD_expected_Date or Macro.lookupOne(id=$id).Alert_Expiry
else:
return None