<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Applying Feature Data Form attributes to multiple new features/records in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/applying-feature-data-form-attributes-to-multiple/m-p/329371#M8453</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I added a button to the Feature Data Form. All that this button does it Adds a new record (feature) in a related feature table. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the several features selected and their attributes are displayed in a FeatureDataGrid. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I add a button in the FeatureDataGrid that opens the feature Data Form and then when the hit the (AddAllRecordButton) it adds a new record in the related table. I have a one to one WorkORder related table system going and I???m trying to create a way my endusers can selected many features and create a workorder for each feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So this code basically creates a record in the related feature class for each selected graphic in my Feature Data Grid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I???m running into is if the user fills out any information it is not writing those attributes to the newly created records.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Long story short I was hoping you could give me some insight on how to apply the changes to all new records created. I was wondering if there was a way to grab the information that was typed into the feature data form textboxes. The problem I have is I don???t know what they are called because the feature data form is binded and created on fly (MyFeatureDataForm.FeatureLayer = l)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I Keep thing something simple like, but I don???t know if the input boxes on the Feature Data Form have names and if so what they are named.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;g.Attributes["COMMENTS"] = MyFeatureDataForm.CommentsTextBox.Text;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The feature data form has new information that the enduser supplied and I need to apply this to all the records I just created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I can???t grab the information and physically ApplyChanges() -- because I know the ObjectIDs/RelatedID that werer created in the related feature class/table. I was wondering right after I add the new graphic, I could select it and then applychanges, which is what I going for below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;

private void AddAllRecordButton_Click(object sender, RoutedEventArgs e)
{
foreach (Graphic qg in QueryDetailsDataGrid.GraphicsLayer)
{
var g = new Graphic();


g.Attributes["CleanID"] = Convert.ToInt32(qg.Attributes["OBJECTID"]);

MyFeatureDataForm.ApplyChanges();


l.Graphics.Add(g);

MyFeatureDataForm.ApplyChanges();

}

l.SaveEdits();

}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems like this board is slowing dying but I'm hoping there is someone out there that will/can help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2014 15:41:04 GMT</pubDate>
    <dc:creator>GISProgrammer</dc:creator>
    <dc:date>2014-01-07T15:41:04Z</dc:date>
    <item>
      <title>Applying Feature Data Form attributes to multiple new features/records</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/applying-feature-data-form-attributes-to-multiple/m-p/329371#M8453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I added a button to the Feature Data Form. All that this button does it Adds a new record (feature) in a related feature table. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the several features selected and their attributes are displayed in a FeatureDataGrid. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I add a button in the FeatureDataGrid that opens the feature Data Form and then when the hit the (AddAllRecordButton) it adds a new record in the related table. I have a one to one WorkORder related table system going and I???m trying to create a way my endusers can selected many features and create a workorder for each feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So this code basically creates a record in the related feature class for each selected graphic in my Feature Data Grid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I???m running into is if the user fills out any information it is not writing those attributes to the newly created records.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Long story short I was hoping you could give me some insight on how to apply the changes to all new records created. I was wondering if there was a way to grab the information that was typed into the feature data form textboxes. The problem I have is I don???t know what they are called because the feature data form is binded and created on fly (MyFeatureDataForm.FeatureLayer = l)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I Keep thing something simple like, but I don???t know if the input boxes on the Feature Data Form have names and if so what they are named.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;g.Attributes["COMMENTS"] = MyFeatureDataForm.CommentsTextBox.Text;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The feature data form has new information that the enduser supplied and I need to apply this to all the records I just created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I can???t grab the information and physically ApplyChanges() -- because I know the ObjectIDs/RelatedID that werer created in the related feature class/table. I was wondering right after I add the new graphic, I could select it and then applychanges, which is what I going for below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;

private void AddAllRecordButton_Click(object sender, RoutedEventArgs e)
{
foreach (Graphic qg in QueryDetailsDataGrid.GraphicsLayer)
{
var g = new Graphic();


g.Attributes["CleanID"] = Convert.ToInt32(qg.Attributes["OBJECTID"]);

MyFeatureDataForm.ApplyChanges();


l.Graphics.Add(g);

MyFeatureDataForm.ApplyChanges();

}

l.SaveEdits();

}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems like this board is slowing dying but I'm hoping there is someone out there that will/can help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:41:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/applying-feature-data-form-attributes-to-multiple/m-p/329371#M8453</guid>
      <dc:creator>GISProgrammer</dc:creator>
      <dc:date>2014-01-07T15:41:04Z</dc:date>
    </item>
  </channel>
</rss>

