Select to view content in your preferred language

Equivalent of Update/Search Cursor from ArcPy in Javascript using no Map?

1496
7
09-08-2016 02:00 PM
SamuelAbati
New Contributor III

We are trying to build a web application using only forms for our users to populate our related tables in our Geodatabase (Oracle), it is required that it contains no map visualization, only simple user forms.

My questions are :

How to perform a database connection in Javascript?

How to display and edit tables?

How to display features as tables (retrieve them as a list, like in SearchCursor)?

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Samuel,

  1. JS is a client language not like python. It does not have access to databases except through RESTful web services. So you publish your data to ArcGIS Server and then use it's mapservice REST endpoint.
  2. Displaying tables can be done trough the FeatureTable widget and editing through FeatureLayer.applyEdits
  3. Same question as #2 basically so same answer.
SamuelAbati
New Contributor III

Hello Robert, thanks for the quick reply,

We do have a feature layer service for this dataset, I know that, when you use a webmap that requires authentication, it displays a popup asking for you to login.

My doubt is how would this work without a webmap, can I still load and access the service normally?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Samuel,

   You would use a proxy to avoid the identity manager dialog.

0 Kudos
SamuelAbati
New Contributor III

Last question, is it not possible to retrieve a table as a list of strings and attribute its values to our custom web GUI? Or is it only possible to use the predefined feature table widget?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Samuel,

  Sure that is possible if you want to do your own esriRequest to get the json from the map service.

0 Kudos
SamuelAbati
New Contributor III

So, let me see if I understood it.

Use a proxy to auth into our web service

Use EsriRequest to get the data as text and display it as we wish

Use FeatureLayer.ApplyEdits to edit our data through the feature layer web service

Sorry for being so pendant, just trying to make sure its possible before applying resources to this task

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Samuel,

   Correct on each account.

0 Kudos