Hi Xander. Yes - I used the GUI to create the Arcade expression. I have 3 feature classes that have a relationship with the "Program" table and they all seem to have the same problem. If you want to take a look first hand I can send you credentials to our test organization - let me know where to send that.
I thought maybe it had something to do with my data being served up from an ArcGIS server REST endpoint - but you can see here that it works for one relationship but not the other.
var fs1 = FeatureSetByRelationshipName($feature,"Site_ConservationMeasures")
var fs2 = FeatureSetByRelationshipName($feature,"Program")
Console(Count(fs1))
Console(Count(fs2))
Use Console Function to output messages.
0
Execution Error:Cannot read property 'toString' of null
Here is what the relationship looks like: