Esri / geoform-template-js

GeoForm is a configurable template for form based data editing of a Feature Service.
http://esri.github.io/geoform-template-js/
Apache License 2.0
67 stars 83 forks source link

Need ID Field Adjusted #547

Closed randomblink closed 6 years ago

randomblink commented 6 years ago

We are using the GeoForm to allow Addresses to be entered in our Addressing DB from one department while another department adds addresses through a completely different system. The other department is using a system that generates an ID field through a third party system for workorder / permitting purposes. We would like the GeoForm addresses to have a unique ID generated FROM the GeoForm. Preferrably something simple such as making each ID number be in the 4 million range...

For Example... Other Department : Address ID = 390233 GeoForm : Address ID = 4000023

Is this possible? How?

driskull commented 6 years ago

@randomblink each entry in a feature layer gets an objectid. Why not use the objectid?

clm42 commented 6 years ago

What datatype is the field? Could you just use "GF"+objectid so you dont risk duplicates where the objectid matches the ID for something entered via the workorder system?

randomblink commented 6 years ago

Can I do that inside the GeoForm? Where would I do that?

The field I would need to put this in is the SITEADDID field. "GF" + OBJECTID Preferably padded to 6 digits? That would be perfection.

randomblink commented 6 years ago

How would I adjust the SITEADDID entry through the GeoForm?

randomblink commented 6 years ago

I've tried the following:

"name": "SITEADDID", // field id "alias": "Site Address ID", // label "fieldDescription": "The ID of the address point", // Help text "visible": false, // show this field? "typeField": false, // subtype field? "tooltip": "", // placeholder text "displayType": "text", // text, checkbox, radio, textarea, url, email "defaultValue": "GF1000", "locked": true

Just trying to see if I can get GF1000 added as the SiteID for this address point... nothing.

randomblink commented 6 years ago

If I make the field visible then it works and generates the entry I set the defaultValue to. If I make the field visible, it doesn't matter whether I set it to LOCKED or not, it can be changed... but if it is left alone it does work as desired... But this requires the end user to follow instructions... I NEVER RELY ON THE END USER TO FOLLOW INSTRUCTIONS...

HELP!

driskull commented 6 years ago

Can you use some JavaScript to identify the field and set its input to disabled and maybe add the bootstrap disabled class to it?

randomblink commented 6 years ago

This worked

"name": "SITEADDID", // field id "alias": "Site Address ID", // label "defaultValue": "GF" + new Date().getTime(), "locked": true, "fieldDescription": "The ID of the address point", // Help text "visible": true, // show this field? "typeField": false, // subtype field? "tooltip": "", // placeholder text "displayType": "text", // text, checkbox, radio, textarea, url, email

Thank you all.