<?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: Pull value from question in repeat to parent, based on defined hierarchy in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-value-from-question-in-repeat-to-parent-based/m-p/1603032#M62023</link>
    <description>&lt;P&gt;Simplest trick will be to create calculate field within the repeat with the name &lt;EM&gt;rating_rank&lt;/EM&gt;, and a value of: if(${Rating}='High','3',if(${Rating}='Medium','2',if(${Rating}='1'Low','0')))&lt;/P&gt;&lt;P&gt;Then outside the repeat create a hidden field with a name of &lt;EM&gt;max_rank&lt;/EM&gt;, and a calculation value of :&lt;/P&gt;&lt;P&gt;max(${rating_rank})&lt;/P&gt;&lt;P&gt;That will pull the highest rating rank out of the repeat, You can then reverse the process, and generate the highest rating by creating a field called &lt;EM&gt;max_rating &lt;/EM&gt;with a calculated value of&lt;/P&gt;&lt;P&gt;if(${&lt;EM&gt;max_rank&lt;/EM&gt;}='3','High',if(${&lt;EM&gt;max_rank&lt;/EM&gt;}='2','Medium',if(${&lt;EM&gt;max_rank&lt;/EM&gt;}='3','Low','None')))&lt;/P&gt;&lt;P&gt;Note that since this calculation fires off the last value for rating entered, it will bug out of people scroll backwards though the repeats. Have a play around and check the behaviour, but you will probably want to set&amp;nbsp; the calculation mode to manual, or add a question that forces the user to update before scolling through the repeats.&lt;/P&gt;</description>
    <pubDate>Sat, 05 Apr 2025 09:22:39 GMT</pubDate>
    <dc:creator>LaurenceTait</dc:creator>
    <dc:date>2025-04-05T09:22:39Z</dc:date>
    <item>
      <title>Pull value from question in repeat to parent, based on defined hierarchy</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-value-from-question-in-repeat-to-parent-based/m-p/1602700#M62008</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I have a Survey123 form that is set-up to collect 'main' features as points, with a repeat to collect sub-features as a table - a parent-child relationship between the two.&lt;/P&gt;&lt;P&gt;The sub-features are all assigned a &lt;EM&gt;select_one&lt;/EM&gt; value of 'High', 'Medium', 'Low', or 'None'.&lt;/P&gt;&lt;P&gt;I have a field in the parent feature section called '&lt;EM&gt;Highest value present&lt;/EM&gt;' - and was hoping there was a way to calculate/auto-populate this based on the '&lt;EM&gt;Rating&lt;/EM&gt;' values captured in multiple child sub-features, with a rule that High takes priority over Medium, over Low, over None.&lt;/P&gt;&lt;P&gt;For example, if a feature has three sub-features with ratings of Low, Medium, Low - I'm after it pulling the Medium value across.&lt;/P&gt;&lt;P&gt;I tried a basic if statement in the calculation field of the xlsform along these lines, hoping that the order would dictate the hierarchy:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(${Rating}='High','High',if(${Rating}='Medium','Medium',if(${Rating}='Low','Low','None')))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But the calculated field in the parent layer defaults to the last repeat's value entered.&lt;/P&gt;&lt;P&gt;Is there any way to achieve this? Ultimately looking to keep the detail of the sub-features for reports etc., whilst assigning the highest value to the parent points for quick and easy mapping.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 11:45:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-value-from-question-in-repeat-to-parent-based/m-p/1602700#M62008</guid>
      <dc:creator>jetemple</dc:creator>
      <dc:date>2025-04-04T11:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pull value from question in repeat to parent, based on defined hierarchy</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-value-from-question-in-repeat-to-parent-based/m-p/1603032#M62023</link>
      <description>&lt;P&gt;Simplest trick will be to create calculate field within the repeat with the name &lt;EM&gt;rating_rank&lt;/EM&gt;, and a value of: if(${Rating}='High','3',if(${Rating}='Medium','2',if(${Rating}='1'Low','0')))&lt;/P&gt;&lt;P&gt;Then outside the repeat create a hidden field with a name of &lt;EM&gt;max_rank&lt;/EM&gt;, and a calculation value of :&lt;/P&gt;&lt;P&gt;max(${rating_rank})&lt;/P&gt;&lt;P&gt;That will pull the highest rating rank out of the repeat, You can then reverse the process, and generate the highest rating by creating a field called &lt;EM&gt;max_rating &lt;/EM&gt;with a calculated value of&lt;/P&gt;&lt;P&gt;if(${&lt;EM&gt;max_rank&lt;/EM&gt;}='3','High',if(${&lt;EM&gt;max_rank&lt;/EM&gt;}='2','Medium',if(${&lt;EM&gt;max_rank&lt;/EM&gt;}='3','Low','None')))&lt;/P&gt;&lt;P&gt;Note that since this calculation fires off the last value for rating entered, it will bug out of people scroll backwards though the repeats. Have a play around and check the behaviour, but you will probably want to set&amp;nbsp; the calculation mode to manual, or add a question that forces the user to update before scolling through the repeats.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 09:22:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-value-from-question-in-repeat-to-parent-based/m-p/1603032#M62023</guid>
      <dc:creator>LaurenceTait</dc:creator>
      <dc:date>2025-04-05T09:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pull value from question in repeat to parent, based on defined hierarchy</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-value-from-question-in-repeat-to-parent-based/m-p/1603036#M62024</link>
      <description>&lt;P&gt;This is absolutely perfect, thank you so much!&lt;/P&gt;&lt;P&gt;I found chucking a &lt;EM&gt;calculationMode=always&lt;/EM&gt; in &lt;EM&gt;bind::esri:parameters&lt;/EM&gt; sorts out things needing to be refreshed when jumping back and forth between repeats.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 11:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-value-from-question-in-repeat-to-parent-based/m-p/1603036#M62024</guid>
      <dc:creator>jetemple</dc:creator>
      <dc:date>2025-04-05T11:23:36Z</dc:date>
    </item>
  </channel>
</rss>

