<?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: iterating over an array while creating profile scripts in Adobe Target Discussions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445757#M3078</link>
    <description>&lt;P&gt;Looks like you found a solution. There is a pretty decent built in method also just to share:&lt;/P&gt;&lt;PRE&gt;var param = page.param('PARAMETERNAME');&lt;/PRE&gt;&lt;P&gt;If you know the name of the page query parameter you can reference it directly in a profile script like above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The little "available tokens" widget on the right side of the edit script pane shows some of these.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-03-24_15-16-39.jpg" style="width: 213px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/39559i85C4ABA2117B6B6C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="2022-03-24_15-16-39.jpg" alt="2022-03-24_15-16-39.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope that is helpful.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 22:19:59 GMT</pubDate>
    <dc:creator>Ryan_Roberts_</dc:creator>
    <dc:date>2022-03-24T22:19:59Z</dc:date>
    <item>
      <title>iterating over an array while creating profile scripts</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445022#M3072</link>
      <description>&lt;P&gt;I am trying to code a profile script that looks for some query parameters.&amp;nbsp; At some point after I have split the query parameters into an array, how should i iterate over the array to find the query parameter I need.&amp;nbsp; I have tried using for, forEach, while loops...all show some syntax error although the function works perfectly fine when ran on the browser console.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 14:31:31 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445022#M3072</guid>
      <dc:creator>sonalipai</dc:creator>
      <dc:date>2022-03-23T14:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: iterating over an array while creating profile scripts</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445432#M3075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="17440349"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you said it's working fine in bowser console however not in profile script, Is it possible you to put your code here in dummy form so we can troubleshoot&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 10:15:32 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445432#M3075</guid>
      <dc:creator>Gokul_Agiwal</dc:creator>
      <dc:date>2022-03-23T10:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: iterating over an array while creating profile scripts</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445476#M3076</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;LI-USER uid="13387685"&gt;&lt;/LI-USER&gt;&amp;nbsp;:&lt;/P&gt;&lt;P&gt;Found the solution, apparently iterators do not work in profile scripts that is because adobe targets does not like javascripts with more than 2000 js instructions in the script.&amp;nbsp; The easiest way was to use a split() function.&lt;/P&gt;&lt;P&gt;Example like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var text =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"How are you doing today?"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;varcount = text.&lt;/SPAN&gt;&lt;SPAN class=""&gt;split&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"are"&lt;/SPAN&gt;&lt;SPAN&gt;).length -1;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 13:08:03 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445476#M3076</guid>
      <dc:creator>sonalipai</dc:creator>
      <dc:date>2022-03-23T13:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: iterating over an array while creating profile scripts</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445480#M3077</link>
      <description>&lt;P&gt;Glad that it's working now, Thanks you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 13:18:52 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445480#M3077</guid>
      <dc:creator>Gokul_Agiwal</dc:creator>
      <dc:date>2022-03-23T13:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: iterating over an array while creating profile scripts</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445757#M3078</link>
      <description>&lt;P&gt;Looks like you found a solution. There is a pretty decent built in method also just to share:&lt;/P&gt;&lt;PRE&gt;var param = page.param('PARAMETERNAME');&lt;/PRE&gt;&lt;P&gt;If you know the name of the page query parameter you can reference it directly in a profile script like above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The little "available tokens" widget on the right side of the edit script pane shows some of these.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-03-24_15-16-39.jpg" style="width: 213px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/39559i85C4ABA2117B6B6C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="2022-03-24_15-16-39.jpg" alt="2022-03-24_15-16-39.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope that is helpful.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 22:19:59 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445757#M3078</guid>
      <dc:creator>Ryan_Roberts_</dc:creator>
      <dc:date>2022-03-24T22:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: iterating over an array while creating profile scripts</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445836#M3079</link>
      <description>&lt;P&gt;&lt;LI-USER uid="2726026"&gt;&lt;/LI-USER&gt;:&lt;/P&gt;&lt;P&gt;That was my initial solution.&amp;nbsp; But unfortunately, there is no good documentation around page.param.&lt;/P&gt;&lt;P&gt;How should page.param be used if there are multiple same name params in the query string.&amp;nbsp; I was assuming that page.param would return an array, but i think it returns a string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 13:15:28 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-target-discussions/iterating-over-an-array-while-creating-profile-scripts/m-p/445836#M3079</guid>
      <dc:creator>sonalipai</dc:creator>
      <dc:date>2022-03-25T13:15:28Z</dc:date>
    </item>
  </channel>
</rss>

