<?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: Can 200.6 parse this arcade expression that launches Survey 123 (in a browser)? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/can-200-6-parse-this-arcade-expression-that/m-p/1576646#M13248</link>
    <description>&lt;P&gt;I believe this should work, I don't see anything in the script that can't be handled by Arcade Evaluation support in native SDKs. Did you run into any issue?&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2025 22:56:58 GMT</pubDate>
    <dc:creator>PreetiMaske</dc:creator>
    <dc:date>2025-01-16T22:56:58Z</dc:date>
    <item>
      <title>Can 200.6 parse this arcade expression that launches Survey 123 (in a browser)?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-200-6-parse-this-arcade-expression-that/m-p/1576558#M13245</link>
      <description>&lt;P&gt;I've been handed a web map that includes Arcade logic to build a link to launch survey 123 (in a browser) from a feature's popup.&amp;nbsp; Arcade is a bit of blind spot for me, so I am hoping I can get some feedback concerning if 200.6 has the necessary parsing and expression handling to evaluate this script (below).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;(all URLs and GUIDS have been modified to protect the innocent)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//query the survey layer to see if a survey exists using the UIC ID
var survey = FeatureSetByPortalItem(Portal('https://www.some_domain.com/portal'),'3a9166a153ab451666715815d606904f',0, ['uic_id', 'globalid'])

var id = Text($feature.uicid)
var query = "uic_id = " +  "'"+ id + "'"
Console(query)
var result = Filter(survey, query)

//if there is a matching survey, send a link to edit, otherwise send a link to a new survey
if(Count(result)&amp;gt;= 1) {
 
    var edit_link = "https://survey123.arcgis.com/share/7b1aeio44a204416b819a60ad3e4c8b4?portalUrl=https://www.some_domain.com/portal&amp;amp;"
    var globalId ="mode=edit&amp;amp;globalId=" + StandardizeGuid((First(result).globalid),'digits-hyphen')
    var full_edit_link = edit_link + globalId
    var edit_link_expression = '&amp;lt;a&amp;gt;A survey for this UIC ID already exists&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;lt;a href="' +full_edit_link + '"&amp;gt;Edit Existing Survey&amp;lt;/a&amp;gt;' 

    return {
      "type": "text",
      "text": edit_link_expression    
    }
} 
else 
{
    var link = "https://survey123.arcgis.com/share/7b1aeio44a204416b819a60ad3e4c8b4?portalUrl=https://www.some_domain.com/portal"
    var uicId = "&amp;amp;field:uic_id=" + $feature.uicid 
    var siteAdd ="&amp;amp;field:site_address=" + $feature.siteAddress 
    var deqId = "&amp;amp;field:deq_id=" + $feature.DEQID 
    var unitId = "&amp;amp;field:unit_id=" + $feature.unitID 
    var hansenProjNumber = "&amp;amp;field:hansen_project_number=" + $feature.projectNumber
    //get location
    var location = "&amp;amp;location=" +Geometry($feature).Y +"," +Geometry($feature).X

    var fullLink = link + uicId + siteAdd + deqId + unitId + hansenProjNumber +location
    var link_expression = '&amp;lt;a&amp;gt;Create a new Survey&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;lt;a href="' +fullLink + '"&amp;gt;Launch Survey123&amp;lt;/a&amp;gt;'

     return {
        "type": "text",
        "text": link_expression
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 18:49:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-200-6-parse-this-arcade-expression-that/m-p/1576558#M13245</guid>
      <dc:creator>Mike_Quetel</dc:creator>
      <dc:date>2025-01-16T18:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can 200.6 parse this arcade expression that launches Survey 123 (in a browser)?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-200-6-parse-this-arcade-expression-that/m-p/1576646#M13248</link>
      <description>&lt;P&gt;I believe this should work, I don't see anything in the script that can't be handled by Arcade Evaluation support in native SDKs. Did you run into any issue?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 22:56:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-200-6-parse-this-arcade-expression-that/m-p/1576646#M13248</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2025-01-16T22:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can 200.6 parse this arcade expression that launches Survey 123 (in a browser)?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/can-200-6-parse-this-arcade-expression-that/m-p/1577410#M13249</link>
      <description>&lt;P&gt;I haven't attempted to implement it yet... was more inquiring about obvious red flags before going through the process of building this out.&amp;nbsp; Appreciate your feedback!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 14:33:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/can-200-6-parse-this-arcade-expression-that/m-p/1577410#M13249</guid>
      <dc:creator>Mike_Quetel</dc:creator>
      <dc:date>2025-01-21T14:33:40Z</dc:date>
    </item>
  </channel>
</rss>

