<?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 Re: Setting a Feature attribute value of a Blob field type : NotSupported in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1365890#M12419</link>
    <description>&lt;P&gt;Try to update the fields&amp;nbsp;CanLiteConfigPACP,&amp;nbsp;CanLiteConfigMACP,&amp;nbsp;QCardConfigMACP or QCardConfigPACP of the feature&amp;nbsp;&lt;SPAN&gt;here&amp;nbsp;&lt;A href="https://services6.arcgis.com/iLx36dZM4ZchIav8/ArcGIS/rest/services/SAM_20231221/FeatureServer/4" target="_blank"&gt;https://services6.arcgis.com/iLx36dZM4ZchIav8/ArcGIS/rest/services/SAM_20231221/FeatureServer/4&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To answer your questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;BR /&gt;byte[] byteValue =&amp;nbsp;System.Text.Encoding.UTF8.GetBytes(stringValue);&lt;BR /&gt;myFeature.SetAttributeValue("QCardConfigPACP", byteValue);&lt;BR /&gt;&lt;BR /&gt;Then I get&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;System.NotSupportedException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The data type System.Byte[] is not supported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at Esri.ArcGISRuntime.Data.CoreElementExtensions.SetAttributeValue(CoreElement element, Object value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at Esri.ArcGISRuntime.Internal.AttributeDictionary.set_Item(String key, Object value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;Esri.ArcGISRuntime 200.2.0&lt;/LI&gt;&lt;LI&gt;.Net 6&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can easily update the field using the web UI and passing a base64 string. Using the SDK, I can then read the value this way:&lt;BR /&gt;&lt;BR /&gt;string base64String = System.Text.Encoding.Default.GetString(((IList&amp;lt;byte&amp;gt;)(Feature.GetAttributeValue("QCardConfigPACP"))).ToArray());&lt;BR /&gt;byte[] bytes = Convert.FromBase64String(base64String);&lt;BR /&gt;return System.Text.Encoding.UTF8.GetString(bytes);&lt;/P&gt;&lt;P&gt;But I can't write the attribute value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 17:19:11 GMT</pubDate>
    <dc:creator>PierreMasson</dc:creator>
    <dc:date>2024-01-03T17:19:11Z</dc:date>
    <item>
      <title>Setting a Feature attribute value of a Blob field type : NotSupported</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1358231#M12364</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We have published a Feature Service containing data and some of the fields are FieldType.Blob.&lt;/P&gt;&lt;P&gt;When we get the data using the ArcGIS MAp SDK we have no problem reading the field and using it. But if we want to set it`s value I get this exception:&lt;BR /&gt;&lt;BR /&gt;System.NotSupportedException&lt;BR /&gt;The data type System.Byte[] is not supported.&lt;BR /&gt;at Esri.ArcGISRuntime.Data.CoreElementExtensions.SetAttributeValue(CoreElement element, Object value)&lt;BR /&gt;at Esri.ArcGISRuntime.Internal.AttributeDictionary.set_Item(String key, Object value)&lt;BR /&gt;&lt;BR /&gt;I was passing a byte[]. So I checked the type of the attribute. It says ReadOnlyCollection&amp;lt;byte&amp;gt;. So I tried to set the value by transforming my byte[] to a&amp;nbsp;ReadOnlyCollection&amp;lt;byte&amp;gt; and I get the same exception.&lt;BR /&gt;&lt;BR /&gt;Si is it a SDK limitation? Is it just for now and later on it will be supported? Or is there something I can do differently to make it work?&lt;BR /&gt;&lt;BR /&gt;These fields holds some serialized json transformed to byte[]. It was the best way we found to store large value in a field without having to set a field length. In SQL Server I would have used nvarchar(MAX) and store the json in text. Is there a better way to do that in ArcGIS/ArcGIS Online?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 13:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1358231#M12364</guid>
      <dc:creator>PierreMasson</dc:creator>
      <dc:date>2023-12-08T13:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Feature attribute value of a Blob field type : NotSupported</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1359237#M12369</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69548"&gt;@PierreMasson&lt;/a&gt;, thank you for your question. Would you kindly answer the following to better help me understand your issue?&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Any reproducer code?&lt;/LI&gt;&lt;LI&gt;Which version of ArcGIS Maps SDK are you using?&lt;/LI&gt;&lt;LI&gt;What version of .NET are you using?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;It seems like this is the first time you've attempted this workflow, using a Blob field with our SDK?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;William&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 17:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1359237#M12369</guid>
      <dc:creator>williambohrmann3</dc:creator>
      <dc:date>2023-12-11T17:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Feature attribute value of a Blob field type : NotSupported</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1359459#M12371</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69548"&gt;@PierreMasson&lt;/a&gt;&amp;nbsp;- this is not supported at the moment. Feel free to contribute this idea on&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-maps-sdks-native-ideas/idb-p/arcgis-runtime-sdks-ideas" target="_self"&gt;ArcGIS Maps SDKs Native Ideas&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 23:26:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1359459#M12371</guid>
      <dc:creator>williambohrmann3</dc:creator>
      <dc:date>2023-12-11T23:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Feature attribute value of a Blob field type : NotSupported</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1365890#M12419</link>
      <description>&lt;P&gt;Try to update the fields&amp;nbsp;CanLiteConfigPACP,&amp;nbsp;CanLiteConfigMACP,&amp;nbsp;QCardConfigMACP or QCardConfigPACP of the feature&amp;nbsp;&lt;SPAN&gt;here&amp;nbsp;&lt;A href="https://services6.arcgis.com/iLx36dZM4ZchIav8/ArcGIS/rest/services/SAM_20231221/FeatureServer/4" target="_blank"&gt;https://services6.arcgis.com/iLx36dZM4ZchIav8/ArcGIS/rest/services/SAM_20231221/FeatureServer/4&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To answer your questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;BR /&gt;byte[] byteValue =&amp;nbsp;System.Text.Encoding.UTF8.GetBytes(stringValue);&lt;BR /&gt;myFeature.SetAttributeValue("QCardConfigPACP", byteValue);&lt;BR /&gt;&lt;BR /&gt;Then I get&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;System.NotSupportedException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The data type System.Byte[] is not supported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at Esri.ArcGISRuntime.Data.CoreElementExtensions.SetAttributeValue(CoreElement element, Object value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at Esri.ArcGISRuntime.Internal.AttributeDictionary.set_Item(String key, Object value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;Esri.ArcGISRuntime 200.2.0&lt;/LI&gt;&lt;LI&gt;.Net 6&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can easily update the field using the web UI and passing a base64 string. Using the SDK, I can then read the value this way:&lt;BR /&gt;&lt;BR /&gt;string base64String = System.Text.Encoding.Default.GetString(((IList&amp;lt;byte&amp;gt;)(Feature.GetAttributeValue("QCardConfigPACP"))).ToArray());&lt;BR /&gt;byte[] bytes = Convert.FromBase64String(base64String);&lt;BR /&gt;return System.Text.Encoding.UTF8.GetString(bytes);&lt;/P&gt;&lt;P&gt;But I can't write the attribute value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 17:19:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/setting-a-feature-attribute-value-of-a-blob-field/m-p/1365890#M12419</guid>
      <dc:creator>PierreMasson</dc:creator>
      <dc:date>2024-01-03T17:19:11Z</dc:date>
    </item>
  </channel>
</rss>

