Select to view content in your preferred language

Hide an editable field in Hosted View

279
9
08-20-2024 12:45 PM
MaximeDemers
Frequent Contributor

Hello,

Is there a way to hide an editable field in a Hosted View on ArcGIS Online?

This is my challenge:

I have a Hosted FeatureLayer View where people can anonymously add data in it. One of the field is the email. I dont want the email field to be visible to everybody. I would like to hide and make it not queryable. 

However, if I create my Hosted View without the email field, the field stay empty when people are adding data in it.

Is there a way to achieve both? Editable but hidden?

9 Replies
BrianBaldwin
Esri Regular Contributor

Just add the e-mail field in the 'original/source' dataset - and don't include it in the view. Then you should be all set!

-----------------------------------

Brian Baldwin, Esri Inc., Lead Solution Engineer
https://www.linkedin.com/in/baldwinbrian
MaximeDemers
Frequent Contributor

Thanks for the reply. I already tried that but if the field is not included in the editable view, no data is added in it.

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor
0 Kudos
MaximeDemers
Frequent Contributor

Thanks for the reply. I already tried that but if the field is not included in the editable view, no data can be added in it from the view.

0 Kudos
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Then why not include it and then hide it?

Question | Analyze | Visualize
0 Kudos
MaximeDemers
Frequent Contributor

This option just hide for the current vizualization. Even if you save it, the field visibility options are not preserved.

0 Kudos
EmilyGeo
Esri Contributor

Hi @MaximeDemers

You have some options depending on where you want this field hidden.

Views: You could create multiple views, one for editing (field visible) and one for visualizing (field hidden). 

Forms: Have you configured a form for editing? One option is to create a conditional visibility expression in the form. You could use an Arcade expression so that the field is only visible when the feature is created. That way the user who creates the feature can enter their email, but it won't be visible to others who open the form. 

Sample code:  $editcontext.editType == 'INSERT'

Pop-ups: If you don't want the field to be visible in the pop-up, you can configure that in the pop-up. 

Table: Unfortunately hiding fields in the table is not persisted in Map Viewer at this time. We are working on bringing in support for that in the future. So that brings us back around to using a different view where the field is hidden ....

Hope this helps! 

MaximeDemers
Frequent Contributor

Hello @EmilyGeo, thank you for your reply. That's really helping. I understand using different views, one for editing and on for visualizing could work in some way, but my goal is to be sure that the personal data that the users are sending us through the javascript application is fully protected.

Tell me if I am wrong, but from my understanding, even if I use two views, the data would still be accessible in the editable view to anybody that knows how to query an ArcGIS REST Service.

0 Kudos
EmilyGeo
Esri Contributor

Hi Maxime, 

Thanks for the additional information. Are you using ArcGIS Online or Enterprise? 

Enterprise-You can disable the Query operation for a feature service in ArcGIS Server Manager. This can be useful for custom applications that only want users to input new features, but not see, edit, or delete existing features.

Online- For hosted feature services in ArcGIS Online you can configure editing settings so that editors can only see the features they create. 

 

EmilyGeo_0-1724281072492.png