Select to view content in your preferred language

featureLayer applyEdits Update attributes programatically for hidden field

593
1
10-08-2012 06:49 AM
TylerWaring
Frequent Contributor
Greetigns,
I am attempting to update attributes programatically for a hidden field. I am basically trying to exclude a field (PKEY) from the edit widget's attribute inspector. Instead of exposing the user to the PKEY field I would rather popuplate it on the fly since it is only used in a 1:M table relate. So far I have:

const updates:Object = {
   NEIGHBORHOOD: graphic.attributes.NEIGHBORHOOD,
   PAC: graphic.attributes.PAC,
   PKEY: graphic.attributes.OBJECTID
         };
     
graphic.attributes = updates;
var aryUpdates:Array = [ graphic ];

flBoundaries.applyEdits(null, aryUpdates, null);

This is not upadting the PKEY field and I believe that I am either not applying edits to the featureLayer correctly or it is not possible to update a hidden field.

Can anyone point me in the right direction?

Thanks, Tyler
Tags (2)
0 Kudos
1 Reply
TylerWaring
Frequent Contributor
Turns out as I halfway expected that you can not update the values for a field that is hidden.

Thanks,
Tyler
0 Kudos