Hi there!
I am trying to get a table that shows any sports matches that match cells already in the table, to basically avoid having matches with more than 2 entries.
To do this I created a conditional that’ll change the colour to orange should a 2nd entry appear.
The problem is my current code only works if the date is set.
I want it to check against if dates matches, or if there is no date set, but not previous dates.
Here is my conditional:
bets = Bets.lookupRecords(Date=$Date)
bets_list = []
for bet in bets:
if bet.id == $id or bet.Match == "":
continue
if bet.Match == $Match:
return True
I was thinking I could do Bets.lookupRecords(Date=($Date or "" or None))
but that did not work. I am wondering what the correct procedure is to do this?
EDIT: I recognize my fault. Having (A or B or C) is the correct way of doing it, but I’m doing it wrong. $Date evaluates to nothing on empty rows, therefore it doesn’t work. I will fix it and post my fix here for anyone else who has run into this.