<?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 Not able to create attributes in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302649#M2013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a new feature on my geodatabase feature table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Feature feature = geodatabaseFeatureTable.createFeature(attributes, geometry);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on success of creation, attributes what I am passing is not showing up, when I do,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; feature.getAttributes()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it shows only attributes that I have configured in feature layer while creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I achieve adding my custom attribute to the feature !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is really blocking my whole design. Suggestion pls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Aug 2019 13:00:23 GMT</pubDate>
    <dc:creator>DevendraKhatri</dc:creator>
    <dc:date>2019-08-12T13:00:23Z</dc:date>
    <item>
      <title>Not able to create attributes</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302649#M2013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a new feature on my geodatabase feature table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Feature feature = geodatabaseFeatureTable.createFeature(attributes, geometry);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on success of creation, attributes what I am passing is not showing up, when I do,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; feature.getAttributes()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it shows only attributes that I have configured in feature layer while creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I achieve adding my custom attribute to the feature !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is really blocking my whole design. Suggestion pls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2019 13:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302649#M2013</guid>
      <dc:creator>DevendraKhatri</dc:creator>
      <dc:date>2019-08-12T13:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create attributes</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302650#M2014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you adding your attributes?&amp;nbsp; Do they properly match the specification of your feature schema?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doc might help:&lt;A href="https://developers.arcgis.com/android/latest/guide/edit-features.htm"&gt;https://developers.arcgis.com/android/latest/guide/edit-features.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also a sample showing this working:&amp;nbsp;&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/java/sample-code/add-features-feature-service/"&gt;https://developers.arcgis.com/android/latest/java/sample-code/add-features-feature-service/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2019 13:40:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302650#M2014</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2019-08-12T13:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create attributes</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302651#M2015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is how I am doing,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;                        geodatabaseFeatureTable.addDoneLoadingListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
                            &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;                            &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
                                Feature feature = &lt;SPAN style="color: #660e7a;"&gt;geodatabaseFeatureTable&lt;/SPAN&gt;.createFeature(&lt;SPAN style="color: #660e7a;"&gt;attributes&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a;"&gt;geometry&lt;/SPAN&gt;);
                           &lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                                &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ListenableFuture&amp;lt;Void&amp;gt; voidListenableFuture = &lt;SPAN style="color: #660e7a;"&gt;geodatabaseFeatureTable&lt;/SPAN&gt;.addFeatureAsync(feature);

                                voidListenableFuture.addDoneListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
                                    &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;                                    &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
                                        &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{
                                            &lt;SPAN style="color: #660e7a;"&gt;voidListenableFuture&lt;/SPAN&gt;.get();
                                            &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ListenableFuture&amp;lt;FeatureQueryResult&amp;gt; addFeatureFuture = &lt;SPAN style="color: #660e7a;"&gt;geodatabaseFeatureTable&lt;/SPAN&gt;.getAddedFeaturesAsync();&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                            &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;}
                        &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/PRE&gt;&lt;P&gt;This method receives the attributes this way,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Map&amp;lt;String, Object&amp;gt; attributes = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;HashMap();
attributes.put(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"GeometryId"&lt;/SPAN&gt;, GeometryId);
attributes.put(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"FID"&lt;/SPAN&gt;, FID);


&lt;/PRE&gt;&lt;P&gt;And these attributes are not part of feature schema, I am adding it newly. [ Can we only update the existing attributes !! ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just need to put some attributes to my feature to identify and do some manipulation. Kind of session attribute is what I need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:30:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302651#M2015</guid>
      <dc:creator>DevendraKhatri</dc:creator>
      <dc:date>2021-12-11T14:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to create attributes</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302652#M2016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are working with a feature service which will have a set schema.&amp;nbsp; The service will be backed by a relational database which has tables which contain fields which will map to the attributes in your feature.&amp;nbsp; If an attribute doesn't exist in the feature, then you can't add them.&amp;nbsp; This is how databases work; you can't change the schema at run-time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should probably take a step back and think about what you are trying to do exactly.&amp;nbsp; Can you design a feature service which has the correct attributes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your data is only needed for the duration of your application running and doesn't need to be persisted on a server / database then you could consider using Graphics which are stored in GraphicsOverlays.&amp;nbsp; These are totally flexible and you can add whatever attributes you like, but they are not persisted after your application stops unless you write your own logic for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Information on Graphics and GraphicsOverlays:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/android/latest/guide/add-graphics-overlays-to-your-app.htm"&gt;https://developers.arcgis.com/android/latest/guide/add-graphics-overlays-to-your-app.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/android/latest/guide/add-graphics-and-text-to-graphics-overlays.htm"&gt;https://developers.arcgis.com/android/latest/guide/add-graphics-and-text-to-graphics-overlays.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2019 11:32:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/not-able-to-create-attributes/m-p/302652#M2016</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2019-08-14T11:32:49Z</dc:date>
    </item>
  </channel>
</rss>

