Select to view content in your preferred language

Field Maps, FeatureSetByRelationshipName, Arcade, Related Tables

3836
23
08-16-2022 07:47 AM
by Anonymous User
Not applicable

Hello,  I am trying to populate a field (Site_ID) in a related table (campground_evaluations) using the arcade function FeatureSetByRelationshipName.  The related feature that I am trying to pull from is called MTH_Campgrounds.

In Field Maps I want to select a point (campground in this example case) and select the related table icon and enter data into the form I created for the table.  Hopefully, this code will reduce the potential for error while inputting data into the table's form.  The feature and table are related using Global IDs.  This is where I am, but I get a Execution Error:Cannot read properties of null (reading 'toString').

var related = FeatureSetByRelationshipName($feature,'MTH_Campgrounds', ["SITE_ID"], false)

var record = First(related)

if (IsEmpty(record)){

  return "No Record Found"

}

return record['SITE_ID']

 

Thanks in advance!

23 Replies
DougBrowning
MVP Esteemed Contributor

Form?  Are you pushing it to a form?  I am not sure at this point I think you have a misspelling or the workflow is off.  Hard to tell anymore without access to the project.  You can PM me if you like.

0 Kudos
Lindsay
Occasional Contributor

Hi @DougBrowning , Yes, what I'm trying to do is write the Block_name from the Blocks layer into the another layer via a form in MapViewer. Similar to what Aaron has done in Point 1 in his article. I've PMed you.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Turned out she was in a map not Field Maps and it says in there that is a no go.

DougBrowning_0-1661381684557.png

 

0 Kudos
Lindsay
Occasional Contributor

Do we have an idea of when FeatureSetByName is going to be available in Map Viewer?

0 Kudos