Description
When using a script expression referencing tables using the FeatureSetByName or FeatureSetByRelationshipClass functions, the table name must use a literal text string and cannot reference a variable.
Solution
Use a literal string for the table name in the script expression.
Refer to the following ArcGIS Arcade function help references for more information: