<?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 Pull Function Will Not Populate Based On Key Field in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-function-will-not-populate-based-on-key-field/m-p/1547529#M59582</link>
    <description>&lt;P&gt;I have an issue where I need to populate a field in one feature class (Building Permits) with data from another feature class (Building Inspections). The two layers share a key field for permit IDs (one field is lowercase and the other is uppercase). The Building Permit layer has a field called "Electric Amount." I would like to use a pull function in a survey linked to the Building Inspection layer to populate a question with data from the Electric Amount field if the permitids are found to match.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote the following pull function to accomplish this, but the data continually fails to populate in the question even after I used a string conversion to handle the integers that are being pulled into a string field. The function doesn't throw any errors in Connect, but it also doesn't pull in any of the desired data when a form is opened.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;string(pulldata("@layer", "ElectricPermit_Amount", "url", "&lt;A href="https://services6.arcgis.com/cMgmhwu0L5CeOOoS/arcgis/rest/services/Department_of_Community_Development/FeatureServer/2" target="_blank" rel="noopener"&gt;https://services6.arcgis.com/cMgmhwu0L5CeOOoS/arcgis/rest/services/Department_of_Community_Development/FeatureServer/2&lt;/A&gt;", "where", "PERMITID='${permitid}'"))&lt;/P&gt;&lt;P&gt;I'm all out of ideas on this one. Can anyone tell me where I might be going wrong?&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2024 12:51:25 GMT</pubDate>
    <dc:creator>Marc_Patti</dc:creator>
    <dc:date>2024-10-10T12:51:25Z</dc:date>
    <item>
      <title>Pull Function Will Not Populate Based On Key Field</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-function-will-not-populate-based-on-key-field/m-p/1547529#M59582</link>
      <description>&lt;P&gt;I have an issue where I need to populate a field in one feature class (Building Permits) with data from another feature class (Building Inspections). The two layers share a key field for permit IDs (one field is lowercase and the other is uppercase). The Building Permit layer has a field called "Electric Amount." I would like to use a pull function in a survey linked to the Building Inspection layer to populate a question with data from the Electric Amount field if the permitids are found to match.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote the following pull function to accomplish this, but the data continually fails to populate in the question even after I used a string conversion to handle the integers that are being pulled into a string field. The function doesn't throw any errors in Connect, but it also doesn't pull in any of the desired data when a form is opened.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;string(pulldata("@layer", "ElectricPermit_Amount", "url", "&lt;A href="https://services6.arcgis.com/cMgmhwu0L5CeOOoS/arcgis/rest/services/Department_of_Community_Development/FeatureServer/2" target="_blank" rel="noopener"&gt;https://services6.arcgis.com/cMgmhwu0L5CeOOoS/arcgis/rest/services/Department_of_Community_Development/FeatureServer/2&lt;/A&gt;", "where", "PERMITID='${permitid}'"))&lt;/P&gt;&lt;P&gt;I'm all out of ideas on this one. Can anyone tell me where I might be going wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 12:51:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-function-will-not-populate-based-on-key-field/m-p/1547529#M59582</guid>
      <dc:creator>Marc_Patti</dc:creator>
      <dc:date>2024-10-10T12:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pull Function Will Not Populate Based On Key Field</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-function-will-not-populate-based-on-key-field/m-p/1547677#M59589</link>
      <description>&lt;P&gt;You don't have the syntax for pulldata correct. This arcticle is super helpful &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-layer/ba-p/1224415" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-layer/ba-p/1224415&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and See the formulas page:&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm" target="_blank"&gt;https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;They have examples further down the page as well. I think you'll need getValue for this one. You're pulldata should look closer to:&lt;/P&gt;&lt;P&gt;pulldata("@layer", "getValue", "attributes.permitId","servicesURL", &lt;SPAN&gt;concat("PERMITID='", ${permitid},"'"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;concat is your friend with this one for the where statement. Also many people find it helpful to have the where statement on a different line then the pulldata function, i'd suggest doing that as well with the string aspect of it. For whatever reason it'll just functions better.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 17:43:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-function-will-not-populate-based-on-key-field/m-p/1547677#M59589</guid>
      <dc:creator>RobynSnookCCB</dc:creator>
      <dc:date>2024-10-10T17:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pull Function Will Not Populate Based On Key Field</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-function-will-not-populate-based-on-key-field/m-p/1548067#M59619</link>
      <description>&lt;P&gt;Ugh, you're right. My syntax was all off. I re-worked the function according to your specs and it did end up working.&lt;/P&gt;&lt;P&gt;That Tips &amp;amp; Tricks section for Survey123 was a great resource too. Thanks for all your help!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 15:24:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-function-will-not-populate-based-on-key-field/m-p/1548067#M59619</guid>
      <dc:creator>Marc_Patti</dc:creator>
      <dc:date>2024-10-11T15:24:18Z</dc:date>
    </item>
  </channel>
</rss>

