<?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 Web AppBuilder attributes  in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33294#M894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; This question is about how to add logic in ArcGIS Online to fields that are populated by application, not by data entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to create in ArcGIS Online a Web Mapping Application that has only one layer. The layer is a feature service pointing to SDE in a versioned environment.&amp;nbsp; The layer is a polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The ArcGIS Online web mapping application works fine. It&amp;nbsp; allows to digitize a new feature polygon and populate its attributes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;My question is about how pre-populate some&amp;nbsp; attributes with default values such as:&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;Date Created, Date when record was created&lt;/LI&gt;&lt;LI&gt;CreatedBy, Editors User ID &lt;/LI&gt;&lt;LI&gt;DateModified, Date when record was modified for the last time&lt;/LI&gt;&lt;LI&gt;ModifiedBy, Editors User ID&lt;/LI&gt;&lt;LI&gt;PrimaryKeyID, populated with a sequential number, obtained from a sequencer in Oracle&lt;/LI&gt;&lt;LI&gt;Other fields&amp;nbsp; like municipality or commission district that are populated with the value of the Municipality or Commission district where this polygon intersects&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For desktop applications I solved this issue creating an ArcMap Add-In.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the old Web ADF I solved this issue using the event:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;Protected Sub EditorTask1_PostToolExecute(ByVal sender As Object, ByVal editorToolEventArgs As EditorToolEventArgs)&amp;nbsp; Handles EditorTask1.PostToolExecute&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know how to do that with Web AppBuilder&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2016 18:21:12 GMT</pubDate>
    <dc:creator>JoseSanchez</dc:creator>
    <dc:date>2016-04-15T18:21:12Z</dc:date>
    <item>
      <title>Web AppBuilder attributes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33294#M894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; This question is about how to add logic in ArcGIS Online to fields that are populated by application, not by data entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to create in ArcGIS Online a Web Mapping Application that has only one layer. The layer is a feature service pointing to SDE in a versioned environment.&amp;nbsp; The layer is a polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The ArcGIS Online web mapping application works fine. It&amp;nbsp; allows to digitize a new feature polygon and populate its attributes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;My question is about how pre-populate some&amp;nbsp; attributes with default values such as:&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;Date Created, Date when record was created&lt;/LI&gt;&lt;LI&gt;CreatedBy, Editors User ID &lt;/LI&gt;&lt;LI&gt;DateModified, Date when record was modified for the last time&lt;/LI&gt;&lt;LI&gt;ModifiedBy, Editors User ID&lt;/LI&gt;&lt;LI&gt;PrimaryKeyID, populated with a sequential number, obtained from a sequencer in Oracle&lt;/LI&gt;&lt;LI&gt;Other fields&amp;nbsp; like municipality or commission district that are populated with the value of the Municipality or Commission district where this polygon intersects&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For desktop applications I solved this issue creating an ArcMap Add-In.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the old Web ADF I solved this issue using the event:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;Protected Sub EditorTask1_PostToolExecute(ByVal sender As Object, ByVal editorToolEventArgs As EditorToolEventArgs)&amp;nbsp; Handles EditorTask1.PostToolExecute&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know how to do that with Web AppBuilder&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 18:21:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33294#M894</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2016-04-15T18:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder attributes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33295#M895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; See this thread for the answer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/thread/170004#comment-576213" title="https://community.esri.com/thread/170004#comment-576213"&gt;https://community.esri.com/thread/170004#comment-576213&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2016 15:25:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33295#M895</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-18T15:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder attributes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33296#M896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took a look to this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not see any event that will trigger when the editor creates or modifies a new feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I would like to implement that works already in an Add-In:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 'Invoked when a feature is created or modified&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub Events_OnCreateFeature(ByVal obj As ESRI.ArcGIS.Geodatabase.IObject)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim inFeature As IFeature = CType(obj, IFeature)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim featureClass As IFeatureClass&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim intNextMyEditableLayerId As Integer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureClass = CType(obj.Class, IFeatureClass)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DisplayFieldNamesAndAliasNames(featureClass)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(featureClass.AliasName)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If featureClass.AliasName &amp;lt;&amp;gt; "MyEditableLayer" And featureClass.AliasName &amp;lt;&amp;gt; "APP.MyEditableLayer" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;nbsp; GetConnectionStrings()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intNextMyEditableLayerId = NextMyEditableLayerNumber()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Populate the next MyEditableLayerID available&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim fieldIndex As Integer = featureClass.FindField("MyEditableLayerID")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If fieldIndex = -1 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inFeature.Value(fieldIndex) = intNextMyEditableLayerId&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2016 17:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33296#M896</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2016-04-18T17:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder attributes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33297#M897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Your add-in code has little bearing in WAB. The thread I pointed you to allows for autopopulating a field with data before the feature is created on the server. The event that is used is the features before-apply-edits&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2016 17:28:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33297#M897</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-18T17:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder attributes</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33298#M898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know this post has been here a while, but I am going to try the smart editor widget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 13:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-attributes/m-p/33298#M898</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2018-06-11T13:48:29Z</dc:date>
    </item>
  </channel>
</rss>

