<?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: Evaulating Popup with Expression using FeatureSetByRelationshipName Crashes App in Swift Maps SDK Questions</title>
    <link>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420710#M278</link>
    <description>&lt;P&gt;Thanks for the reproducible case. The Toolkit's PopupView does use the&amp;nbsp;&lt;SPAN&gt;evaluateExpressions() method. Since this crash is reproducible using the Kotlin SDK then this could be a bug at the SDK level and not in the Toolkit.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2024 20:51:00 GMT</pubDate>
    <dc:creator>Destiny_Hochhalter</dc:creator>
    <dc:date>2024-05-08T20:51:00Z</dc:date>
    <item>
      <title>Evaulating Popup with Expression using FeatureSetByRelationshipName Crashes App</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420652#M275</link>
      <description>&lt;P&gt;I have a layer that is consistently crashing my app when evaluating the popup expressions.&amp;nbsp; I have narrowed it down to three Arcade expressions, which are all using&amp;nbsp;&lt;SPAN&gt;FeatureSetByRelationshipName to get features from related tables.&amp;nbsp; The feature layer is not a hosted service, but is a feature service published from a file geodatabase on ArcGIS Server.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;One thing I have tested is evaluating each expression using the ArcadeEvaluator.&amp;nbsp; I am able to successfully evaluate each expression.&amp;nbsp; It only seems to be an issue when using popup.evaluateExpressions().&amp;nbsp; I also see the same behavior in the Kotlin SDK as well.&lt;/P&gt;&lt;P&gt;My work around has been to adjust my Arcade to do a filter on the table, rather than getting related features.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 19:05:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420652#M275</guid>
      <dc:creator>Justin_Greco</dc:creator>
      <dc:date>2024-05-08T19:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Evaulating Popup with Expression using FeatureSetByRelationshipName Crashes App</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420672#M276</link>
      <description>&lt;P&gt;Hi Justin,&lt;BR /&gt;&lt;BR /&gt;Can you share a small reproducible case using&amp;nbsp;&lt;SPAN&gt;popup.evaluateExpressions()? Also, does this call result in a specific error or crash?&lt;BR /&gt;&lt;BR /&gt;Alternatively, if evaluating each expression using ArcadeEvaluator works, you could try to further evaluate the popup using the evaluate method that takes profile variables. Here is an example of evaluating an arcade expression for a popup from a geotrigger notification for reference:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;var messageExpression: ArcGIS.ArcadeExpression
var popup: Popup

let evaulator = ArcadeEvaluator(expression: messageExpression, profile: .geotriggerNotification)
try await evaulator.load()

let profileVariables: [String: Any] = [
    "$fencefeature": popup.geoElement,
    "$fencenotificationtype": "entered"
]
let result = try await evaulator.evaluate(withProfileVariables: profileVariables)

if let result = result.result(as: .dictionary) as? [String: Any] {
    if let message = result["message"] as? String {
        print(message)
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 19:56:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420672#M276</guid>
      <dc:creator>Destiny_Hochhalter</dc:creator>
      <dc:date>2024-05-08T19:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Evaulating Popup with Expression using FeatureSetByRelationshipName Crashes App</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420690#M277</link>
      <description>&lt;P&gt;Its just a crash, no specific error, just "heap corruption detected".&amp;nbsp; However, I probably should have posted this in the Kotlin SDK community, since for Swift I am using the PopupView from the toolkit, so its just passing the popup to PopupView.&amp;nbsp; Though I imagine its still the evaluateExpressions function internal to the toolkit that is causing the crash.&lt;/P&gt;&lt;P&gt;Here is one of the Arcade expressions that causes the crash.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var url = 'https://services.wakegov.com/realestate/photos/mvideo/'
var condos = FeatureSetByRelationshipName($feature, 'PROPERTY_CONDO', ['*'], false)
var photos = FeatureSetByRelationshipName(First(condos), 'CONDO_PHOTOS')
var photo = First(Filter(photos, 'PRIMARYIMAGE = 1'))
if (photo != null) {
    return Concatenate([url,photo.IMAGEDIR, '/', photo.IMAGENAME])
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 20:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420690#M277</guid>
      <dc:creator>Justin_Greco</dc:creator>
      <dc:date>2024-05-08T20:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Evaulating Popup with Expression using FeatureSetByRelationshipName Crashes App</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420710#M278</link>
      <description>&lt;P&gt;Thanks for the reproducible case. The Toolkit's PopupView does use the&amp;nbsp;&lt;SPAN&gt;evaluateExpressions() method. Since this crash is reproducible using the Kotlin SDK then this could be a bug at the SDK level and not in the Toolkit.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 20:51:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1420710#M278</guid>
      <dc:creator>Destiny_Hochhalter</dc:creator>
      <dc:date>2024-05-08T20:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Evaulating Popup with Expression using FeatureSetByRelationshipName Crashes App</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1424970#M281</link>
      <description>&lt;P&gt;Hi Justin,&lt;BR /&gt;&lt;BR /&gt;To further debug this crash, could you please provide a crash log?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 20:18:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/evaulating-popup-with-expression-using/m-p/1424970#M281</guid>
      <dc:creator>Destiny_Hochhalter</dc:creator>
      <dc:date>2024-05-09T20:18:57Z</dc:date>
    </item>
  </channel>
</rss>

