Select to view content in your preferred language

Attributes filling

1012
4
Jump to solution
02-14-2017 02:37 AM
bharathreddy
Regular Contributor

how to give customized values in attributes while editing

  var newGraphic = new Graphic(point2, null, newAttributes);

0 Kudos
1 Solution

Accepted Solutions
FC_Basson
MVP Alum

You can create your own attributes object and set the attributes at any time:

var attrobj = {
  id: null,
  x: null,
  y: null,
  comment: ""
};

newGraphic.attributes = attrobj;
newGraphic.attributes.id = myIDval;
newGraphic.attributes.x = myXval;
newGraphic.attributes.y = myYval;
newGraphic.attributes.comment = myComment;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

View solution in original post

0 Kudos
4 Replies
FC_Basson
MVP Alum

You can create your own attributes object and set the attributes at any time:

var attrobj = {
  id: null,
  x: null,
  y: null,
  comment: ""
};

newGraphic.attributes = attrobj;
newGraphic.attributes.id = myIDval;
newGraphic.attributes.x = myXval;
newGraphic.attributes.y = myYval;
newGraphic.attributes.comment = myComment;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
bharathreddy
Regular Contributor

will that reflect into database

0 Kudos
FC_Basson
MVP Alum

No, just the graphic's attributes.  You'll still need to push the values through to the editable feature class.

0 Kudos
bharathreddy
Regular Contributor

thank u fc basson it worked

0 Kudos