how to give customized values in attributes while editing
var newGraphic = new Graphic(point2, null, newAttributes);
You can create your own attributes object and set the attributes at any time:
<SPAN class="keyword token">var</SPAN> attrobj <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN> id<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN> x<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN> y<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN> comment<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">""</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN> newGraphic<SPAN class="punctuation token">.</SPAN>attributes <SPAN class="operator token">=</SPAN> attrobj<SPAN class="punctuation token">;</SPAN> newGraphic<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">.</SPAN>id <SPAN class="operator token">=</SPAN> myIDval<SPAN class="punctuation token">;</SPAN> newGraphic<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">.</SPAN>x <SPAN class="operator token">=</SPAN> myXval<SPAN class="punctuation token">;</SPAN> newGraphic<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">.</SPAN>y <SPAN class="operator token">=</SPAN> myYval<SPAN class="punctuation token">;</SPAN> newGraphic<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">.</SPAN>comment <SPAN class="operator token">=</SPAN> myComment<SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
thank u fc basson it worked
No, just the graphic's attributes. You'll still need to push the values through to the editable feature class.
will that reflect into database
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.