Select to view content in your preferred language

Create a drop down list for field using Arcade?

855
2
05-12-2023 08:23 AM
Labels (1)
luckachi
Frequent Contributor

I was wondering if it was possible to create a drop down list for a field using arcade? I do not want to create a domain list in the feature layer because it does not pertain to everyone that currently interacts with the web map. I would like to create a drop down in a new web map (for use in Field Maps) for an Observer Name field for a specific group of users so that they do not continuously have to type in their name when submitting data.

Tags (3)
0 Kudos
2 Replies
ArmstKP
Frequent Contributor

With the Field Maps designer you can calculate a field with the name of the logged in user, by using Arcade.

0 Kudos
luckachi
Frequent Contributor

@ArmstKP - I just tried adding in some arcade to grab the full name of the logged in user. It seems to work in the browser but in the Field Maps app, it does not bring back anything. I'd like to be able to have a drop down list of a few names because at times, the logged in user might not be the actual observer.

This is what I have as the calculation on the observer field:

var u = getUser($layer);
var fullName = u.fullName;
return fullName;
0 Kudos