<?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: Arcade - Declare variable at given time in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401359#M20133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/348609"&gt;Alex Metzler&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain a little more where you want to apply this Arcade expression and why? The where will explain more about when it will be executed. You also mention that you want to store this as a variable. Can you explain a little more about how and where you will store this variable and what you are thinking of doing with it later on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Jun 2019 18:53:32 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2019-06-28T18:53:32Z</dc:date>
    <item>
      <title>Arcade - Declare variable at given time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401358#M20132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Arcade, I am trying to declare a variable at 6pm every day. I want to record the temperature (from field $feature.TEMP) at 6pm each day and have that stored as a variable until the next day at 6pm. Here is what I have tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var TimeNow = Hour(Now()) + (Minute(Now())/100)&lt;BR /&gt;var Temp = 100&lt;/P&gt;&lt;P&gt;if (TimeNow == 18.00){&lt;BR /&gt; var Temp = $feature.TEMP;&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt; var Temp = Temp;&lt;BR /&gt;}&lt;BR /&gt;return Temp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, using IF or WHEN only populates the temperature for that minute when the statements are true. Is there a function I could write to declare the variable at 6pm?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2019 16:59:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401358#M20132</guid>
      <dc:creator>AlexMetzler</dc:creator>
      <dc:date>2019-06-28T16:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Declare variable at given time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401359#M20133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/348609"&gt;Alex Metzler&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain a little more where you want to apply this Arcade expression and why? The where will explain more about when it will be executed. You also mention that you want to store this as a variable. Can you explain a little more about how and where you will store this variable and what you are thinking of doing with it later on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2019 18:53:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401359#M20133</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-06-28T18:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Declare variable at given time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401360#M20134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Can you explain a little more where you want to apply this Arcade expression and why? &lt;STRONG style="color: #008000; "&gt;&lt;EM&gt;This expression is in the symbology of a point layer. The layer has a&amp;nbsp;temperature field that is constantly updated, the temperature is the current temperature, there is only one record.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG style="color: #008000; "&gt;&lt;EM&gt;&lt;SPAN style="color: #3d3d3d; background-color: #ffffff; font-weight: 400;"&gt;Can you explain a little more about how and where you will store this variable and what you are thinking of doing with it later on?&amp;nbsp;&lt;/SPAN&gt;I need it to take a snapshot of the temperature at 6pm and keep it (presumably stored as a variable to return and indicate the symbology for 6pm). I want the color of the point to symbolize what the temperature was at 6pm.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2019 19:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401360#M20134</guid>
      <dc:creator>AlexMetzler</dc:creator>
      <dc:date>2019-06-28T19:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Declare variable at given time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401361#M20135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/348609"&gt;Alex Metzler&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the additional explanation, but I think there will be a challenge in trying to accomplish this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;EM&gt;This expression is in the symbology of a point layer. The layer has a temperature field that is constantly updated, the temperature is the current temperature, there is only one record. I need it to take a snapshot of the temperature at 6pm and keep it (presumably stored as a variable to return and indicate the symbology for 6pm). I want the color of the point to symbolize what the temperature was at 6pm.&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the Arcade expression is applied every time it needs to draw a feature. Since the expression does not write the value to the feature attribute, at a different time than 6 pm there will not be another value that can be drawn (the value "100" in your expression would be visualized at all other times). I think the only option would be to use Arcade expression in an attribute rule or use a schedule task Python script that updates a field at 6 pm&amp;nbsp;with the current value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2019 21:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401361#M20135</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-06-28T21:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Declare variable at given time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401362#M20136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/ametzler_mprb"&gt;ametzler_mprb&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the schedules task that would be required for your case, I just saw that in the Road map of ArcGIS Pro:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/docs/DOC-13641-arcgis-pro-roadmap-july-2019"&gt;https://community.esri.com/docs/DOC-13641-arcgis-pro-roadmap-july-2019&lt;/A&gt;&amp;nbsp;they are mentioning a new feature:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;EM&gt;&lt;STRONG&gt;Geoprocessing Scheduler&lt;/STRONG&gt; - Choose to run your tool immediately, or select a date and time in the future to run it, as well as recurrence.&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;... this could be interesting for your use case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2019 14:51:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401362#M20136</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-07-03T14:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Declare variable at given time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401363#M20137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Xander. That may be it. I could run the tool and write the value at 6pm to the original data table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2019 14:28:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-declare-variable-at-given-time/m-p/401363#M20137</guid>
      <dc:creator>AlexMetzler</dc:creator>
      <dc:date>2019-08-21T14:28:15Z</dc:date>
    </item>
  </channel>
</rss>

