Hello, I'm trying to write a script in Field Maps that will extract a value from a field in one layer and then insert that value into a field in another layer based on snapped/intersecting features. However, I only have a basic understanding of Arcade and am having difficulty formulating a working script (if it's possible?). I found some example of code that I think is what I need, or at least close to what I need but I can't figure out how to tailor it to my needs.
My task is to design where Risers should be placed on Utility Poles, which there is a field in the Riser layer for "Pole ID". So as I'm placing new Risers in the Web map I would like the Riser's "Pole ID" field to auto populate with the corresponding Pole feature ID on which the Riser is snapped. The Riser and Pole are both point features and part of the same Geodatabase which was published as Hosted Feature layer. Below is what I have so far, code is being created within the Riser's "Pole ID" field:

I can't figure out what my return script should be? Or if I should be utilizing completely different approach?
Appreciate any help or insight anyone could offer!