I am trying to create an attribute rule for a point feature class (Manholes) in which I want a field (FacilityID) to populate based on the combination of intersection with a polygon grid (Quarter Section) and a Database Sequence. For example, if I create a new point feature in grid 564 and the point is the 55th point in grid 564, I want the attribute rule to populate the FacilityID field with 564-55. I also want this rule to work with any grid, each which has its own Database Sequence counting the number of points. Here is what I have so far:

This script fails with the following error:

However, the script works if I hardcode the Database Sequence string name into line 12:

Does anyone know what might be causing the inputSequenceName to fail when passed into the NextSequenceValue instead of the hard coded string?
I'd appreciate any help you can provide since this is my first time diving into Attribute Rules with Arcade. Thanks!