<?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 Create a conditional (ie: If value includes to this) function against an array in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2655#M1205</link>
    <description>&lt;P&gt;New to Workat and I am working with a schema that has some nested arrays and I cant seem to figure out how to create a if condition that will be triggered if any option in the nested array contains the specific value.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;create a if condition where "Interests" contains "swimming" so that the data in the schema below is picked up &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  "deliveryContext": {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;  "camper": {&lt;/P&gt;&lt;P&gt;    "demographics": {&lt;/P&gt;&lt;P&gt;      "address": "string",&lt;/P&gt;&lt;P&gt;      "city": "string",&lt;/P&gt;&lt;P&gt;      "state": "string",&lt;/P&gt;&lt;P&gt;      "country": "string",&lt;/P&gt;&lt;P&gt;      "phone": "string",&lt;/P&gt;&lt;P&gt;      "postalCode": "string",&lt;/P&gt;&lt;P&gt;      "email": "string",&lt;/P&gt;&lt;P&gt;      "firstName": "string",&lt;/P&gt;&lt;P&gt;      "lastName": "string",&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;      "Interests": [&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;          "id": "34",&lt;/P&gt;&lt;P&gt;          "value": "biking"},&lt;/P&gt;&lt;P&gt;          {id": "27",&lt;/P&gt;&lt;P&gt;          "value": "biking"}.]&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2022 01:39:07 GMT</pubDate>
    <dc:creator>mlodge</dc:creator>
    <dc:date>2022-04-01T01:39:07Z</dc:date>
    <item>
      <title>Create a conditional (ie: If value includes to this) function against an array</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2655#M1205</link>
      <description>&lt;P&gt;New to Workat and I am working with a schema that has some nested arrays and I cant seem to figure out how to create a if condition that will be triggered if any option in the nested array contains the specific value.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;create a if condition where "Interests" contains "swimming" so that the data in the schema below is picked up &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  "deliveryContext": {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;  "camper": {&lt;/P&gt;&lt;P&gt;    "demographics": {&lt;/P&gt;&lt;P&gt;      "address": "string",&lt;/P&gt;&lt;P&gt;      "city": "string",&lt;/P&gt;&lt;P&gt;      "state": "string",&lt;/P&gt;&lt;P&gt;      "country": "string",&lt;/P&gt;&lt;P&gt;      "phone": "string",&lt;/P&gt;&lt;P&gt;      "postalCode": "string",&lt;/P&gt;&lt;P&gt;      "email": "string",&lt;/P&gt;&lt;P&gt;      "firstName": "string",&lt;/P&gt;&lt;P&gt;      "lastName": "string",&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;      "Interests": [&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;          "id": "34",&lt;/P&gt;&lt;P&gt;          "value": "biking"},&lt;/P&gt;&lt;P&gt;          {id": "27",&lt;/P&gt;&lt;P&gt;          "value": "biking"}.]&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 01:39:07 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2655#M1205</guid>
      <dc:creator>mlodge</dc:creator>
      <dc:date>2022-04-01T01:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create a conditional (ie: If value includes to this) function against an array</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2656#M1206</link>
      <description>&lt;P&gt;It looks like the JSON has some errors in it but my guess is that the correct JSON is:&lt;/P&gt;&lt;P&gt;{"deliveryContext": {"camper": {"demographics": {"address": "string","city": "string","state": "string","country": "string","phone": "string","postalCode": "string","email": "string","firstName": "string","lastName": "string","Interests": [{"id": "34","value": "biking"},{"id": "27","value": "biking"}]}}}}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;And the formula based on that would be:&lt;/P&gt;&lt;P&gt;["deliveryContext"]["camper"]["demographics"]["Interests"].pluck("value")&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 01:59:09 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2656#M1206</guid>
      <dc:creator>dcornwell</dc:creator>
      <dc:date>2022-04-01T01:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create a conditional (ie: If value includes to this) function against an array</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2657#M1207</link>
      <description>&lt;P&gt;&lt;A href="https://systematic.workato.com/workato-migration/users/2412970"&gt;David Cornwell&lt;/A&gt; - thanks, I quickly copied and modified the json to act as an illustrative example. thanks for the assist.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 02:00:26 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2657#M1207</guid>
      <dc:creator>mlodge</dc:creator>
      <dc:date>2022-04-01T02:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create a conditional (ie: If value includes to this) function against an array</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2658#M1208</link>
      <description>&lt;P&gt;I think this works, Sample i tried. &lt;/P&gt;&lt;P&gt; https://app.workato.com/recipes/2239282?st=157230&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 02:41:20 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2658#M1208</guid>
      <dc:creator>rayudu_addagarl</dc:creator>
      <dc:date>2022-04-01T02:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create a conditional (ie: If value includes to this) function against an array</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2659#M1209</link>
      <description>&lt;P&gt;workato's "parse json" does not work with complex json unfortunatley&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 02:45:06 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2659#M1209</guid>
      <dc:creator>rayudu_addagarl</dc:creator>
      <dc:date>2022-04-01T02:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create a conditional (ie: If value includes to this) function against an array</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2660#M1210</link>
      <description>&lt;P&gt;hey &lt;A href="https://systematic.workato.com/workato-migration/users/2593570"&gt;RAYUDU ADDAGRALA&lt;/A&gt; the recipe worked with &lt;A href="https://systematic.workato.com/workato-migration/users/2412970"&gt;David Cornwell&lt;/A&gt;'s json&lt;/P&gt;&lt;P&gt;{"deliveryContext": {"camper": {"demographics": {"address": "string","city": "string","state": "string","country": "string","phone": "string","postalCode": "string","email": "string","firstName": "string","lastName": "string","Interests": [{"id": "34","value": "biking"},{"id": "22","value": "swimming"}]}}}}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;correctly picked up the second id "22" with value "swimming"&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 18:29:16 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2660#M1210</guid>
      <dc:creator>james-ng</dc:creator>
      <dc:date>2022-04-01T18:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create a conditional (ie: If value includes to this) function against an array</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2661#M1211</link>
      <description>&lt;DIV dir="ltr"&gt;In the input&amp;nbsp;&lt;I&gt;field&lt;/I&gt;&amp;nbsp;of the if step enter:&lt;DIV&gt;&lt;U&gt;deliveryContext&lt;/U&gt;[‘camper’][‘Intrests’].pluck(‘value’).include?(‘swimming’) and then setup the condition as “is true”.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;U&gt;Notes:&lt;/U&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;OL&gt;&lt;LI&gt;make sure to use formula mode&lt;/LI&gt;&lt;LI&gt;&lt;U&gt;deliveryContext&lt;/U&gt;&amp;nbsp;is a datapill from a previous step.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Make sure to use actual single quotes (my phone doesn’t put proper single quotes in an email)&lt;/LI&gt;&lt;LI&gt;You need to handle cases where deliverContext is a nil object since using [‘camper’][‘Intrests’] on a nil object will throw an error.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;DIV dir="ltr"&gt;&lt;DIV&gt;&lt;B&gt;Joel Gold&lt;/B&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Principal&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;Doliotech&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;801-613-1115&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Jgold@doliotech.com&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Apr 2022 19:32:27 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/create-a-conditional-ie-if-value-includes-to-this-function/m-p/2661#M1211</guid>
      <dc:creator>jgold</dc:creator>
      <dc:date>2022-04-01T19:32:27Z</dc:date>
    </item>
  </channel>
</rss>

