<?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 Help with arcade language in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175616#M55344</link>
    <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;i´m very new to arcade language so i trying to build a timer with a dinamic starting and ending time:&lt;/P&gt;&lt;P&gt;So i got this so far:&lt;/P&gt;&lt;P&gt;var dataini = Now();&lt;/P&gt;&lt;P&gt;var stat = "Closed";&lt;/P&gt;&lt;P&gt;if (stat == "Closed") {return dataini};&lt;/P&gt;&lt;P&gt;var datafim = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what i need is that my timer stops counting once my "stat" varaible is equal to "Closed".&lt;/P&gt;&lt;P&gt;I also need to grab that exact time an make it my "datafim" variable.&lt;/P&gt;&lt;P&gt;Hope you guys can help me... Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;Greetings from Portugal&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 16:25:31 GMT</pubDate>
    <dc:creator>MarcosCampos</dc:creator>
    <dc:date>2022-05-19T16:25:31Z</dc:date>
    <item>
      <title>Help with arcade language</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175616#M55344</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;i´m very new to arcade language so i trying to build a timer with a dinamic starting and ending time:&lt;/P&gt;&lt;P&gt;So i got this so far:&lt;/P&gt;&lt;P&gt;var dataini = Now();&lt;/P&gt;&lt;P&gt;var stat = "Closed";&lt;/P&gt;&lt;P&gt;if (stat == "Closed") {return dataini};&lt;/P&gt;&lt;P&gt;var datafim = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what i need is that my timer stops counting once my "stat" varaible is equal to "Closed".&lt;/P&gt;&lt;P&gt;I also need to grab that exact time an make it my "datafim" variable.&lt;/P&gt;&lt;P&gt;Hope you guys can help me... Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;Greetings from Portugal&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 16:25:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175616#M55344</guid>
      <dc:creator>MarcosCampos</dc:creator>
      <dc:date>2022-05-19T16:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with arcade language</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175833#M55367</link>
      <description>&lt;P&gt;Arcade is a relatively simple language. Things like POST requests, asynchronous processes and sleep() are not possible. What you describe doesn't seem possible in Arcade.&lt;/P&gt;&lt;P&gt;What is your end goal here? Maybe it can be achieved in another way (or not at all, but then you know...).&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 05:26:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175833#M55367</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-05-20T05:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with arcade language</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175857#M55374</link>
      <description>&lt;P&gt;Hello Johannes,&lt;/P&gt;&lt;P&gt;First of all thanks for your quick reply. According to my research this will be possible. The first thing that im having problems is that i have only one date/hour field and i have to use only that field to retrieve 2 variables. My starting date/time and my end date/time. In Python that would look similar this:&lt;/P&gt;&lt;P&gt;#dataocrr is my data/time field name&lt;BR /&gt;# stat is my field that i will use to a conditional formatting so to speek&lt;BR /&gt;#datafim is my end data/time field name&lt;/P&gt;&lt;P&gt;dataini = dataocrr - #simple right?&lt;/P&gt;&lt;P&gt;When stat == "Closed":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dataini as datafim&lt;/P&gt;&lt;P&gt;How can i do this in arcade!? Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day, and thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 08:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175857#M55374</guid>
      <dc:creator>MarcosCampos</dc:creator>
      <dc:date>2022-05-20T08:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with arcade language</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175865#M55375</link>
      <description>&lt;P&gt;Ah, I misunderstood your original question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you want to calculate a field "datafim" based on the fields "dataoccr" and "stat"? You can do that by using this expression in the CalculateField tool or in an Attribute Rule:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Calulation Attribute Rule
// or Calculate Field
// on field "datafim"

var dataini = $feature.dataoccr  // read the dataoccr field of the current feature
if($feature.stat == "Closed") {  // if the value of field "stat" is "Closed"
    return dataini
}
return null  // $feature.stat != "Closed"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 08:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1175865#M55375</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-05-20T08:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with arcade language</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1177478#M55562</link>
      <description>&lt;P&gt;Hi again Johannes,&lt;/P&gt;&lt;P&gt;Thanks for the reply, i got that far myself, my problem was on to turn that returned value my other varaible ("datafim"). Can i do: " return dataini as var datafim"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again, have a nice day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 09:35:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-language/m-p/1177478#M55562</guid>
      <dc:creator>MarcosCampos</dc:creator>
      <dc:date>2022-05-26T09:35:46Z</dc:date>
    </item>
  </channel>
</rss>

