<?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: nil can't be coerced into Float when trying to add 3 searches together in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5249#M2322</link>
    <description>&lt;P&gt;Your formula looks good, but the previous actions producing the cost values might have their output fields configured incorrectly.&lt;/P&gt;&lt;P&gt;Output data pills default to strings. So if you're using an HTTP connector to get the data, configure your cost output field to be an integer/float.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that doesn't work, then you should be able to wrap the entire formula in parentheses and .to_f its output.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 16:16:43 GMT</pubDate>
    <dc:creator>gary1</dc:creator>
    <dc:date>2023-10-02T16:16:43Z</dc:date>
    <item>
      <title>nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5227#M2315</link>
      <description>&lt;P&gt;is there an easier way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 companies with 5 warehouses each&lt;/P&gt;&lt;P&gt;so I do 3 searches t find all the costs in each warehouses and then just add the data pills together and this worked fine.&lt;/P&gt;&lt;P&gt;but then I started seeing the Nil can't be coerced error so some warehouses will be blank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;do I need to loop through each search and do a if .present to add them together? or is there a trick I'm missing like in SFDC where there is a way to treat NULL as 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also, is there a way to do a loop through 3 searches? or do I need to create a list variable which I'm trying to do but can't seem to combine the 3 searches into a single list&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry if these are basic questions very new&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 16:38:07 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5227#M2315</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-09-29T16:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5228#M2316</link>
      <description>&lt;P&gt;I got it working but its NOT pretty so have 3 search actions 1 for each company pulling 5 Cost fields each.&lt;/P&gt;&lt;P&gt;Then I created I List variable and created 15 Update List variable actions to add those 15 fields to the list.&lt;/P&gt;&lt;P&gt;then I looped through the list variable checking for nil and adding to my original variable to ensure it was a float.&lt;/P&gt;&lt;P&gt;this is working but like I said not pretty I was hoping to pass the searches datapil directly into a variable list which i suspect can be done but I tried everything I could think of.&lt;/P&gt;&lt;P&gt;tonight, this will run in sandbox and I'm curious how long it will take to crunch 2500 or so parts&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 22:09:54 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5228#M2316</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-09-29T22:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5229#M2317</link>
      <description>&lt;P&gt;There are a lot of ways to do this, but it depends on how your data is formatted. If you can make an array of all of the costs, you can use [array].compact.sum, where compact will eliminate the nil values. Otherwise, if you want to add them up individually, you will need to handle nil values with .present? like you mentioned. Something like:&lt;/P&gt;&lt;P&gt;([wh1].present? ? [wh1] : 0) +&amp;nbsp;([wh2].present? ? [wh2] : 0) ... and so on&lt;/P&gt;&lt;P&gt;For your second question, you can loop through three searches, but first you need an input to determine how many times to loop. Here's the general idea:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You have 3 companies, and I'm assuming each company has an ID. Put the IDs&amp;nbsp;in an array.&lt;/LI&gt;&lt;LI&gt;Make a repeat helper list with [array].size (resolves to 3)&lt;/LI&gt;&lt;LI&gt;Use the repeat helper list in a repeat action to loop 3 times&lt;/LI&gt;&lt;LI&gt;Create your action to run your searches (which I assume requires a company ID)&lt;/LI&gt;&lt;LI&gt;Parameterize the company ID in the search action by using [array][loop_index], which will return the ID in the array that corresponds to the index of the current loop&lt;/LI&gt;&lt;LI&gt;Add the cost from the response to a list&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Outside of the loop, pluck the costs from the list and sum them&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 22:25:03 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5229#M2317</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-09-29T22:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5230#M2318</link>
      <description>&lt;P&gt;Glad you made some progress. If you can provide some examples of how the response is formatted, I'm sure there are more elegant and efficient ways to do this.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 22:26:52 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5230#M2318</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-09-29T22:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5242#M2321</link>
      <description>&lt;P&gt;weird my last response didn't show up here...&amp;nbsp;&lt;/P&gt;&lt;P&gt;as I said above I did get it working by manually creating a Variable list (super cludgy) and looped through that with this formula:&lt;/P&gt;&lt;P&gt;=_('data.workato_variable.21e6694a.AverageCostVar').to_f + _('data.foreach.2d63c183.Cost').to_f&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but when I tried your suggestion and did the .present formula within a single variable which is exactly what I nee dto do it seems to be returning a string and not the final number:&lt;/P&gt;&lt;P&gt;(#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgLaborCost')}.present? ?#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgLaborCost')}.to_f : 0) +(#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgBurdenCost')}.present? ?#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgBurdenCost')}.to_f : 0) +(#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgMaterialCost')}.present? ?#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgMaterialCost')}.to_f : 0) + (#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgSubContCost')}.present? ?#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgSubContCost')}.to_f : 0) +(#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgMtlBurCost')}.present? ?#{_('data.epicor_kinetic_connector_638485_1652373679.c3606d3d.value.first.AvgMtlBurCost')}.to_f : 0)&lt;/P&gt;&lt;P&gt;hope this text makes sense I wonder if my screen grabs didn't work before&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 12:25:54 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5242#M2321</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-10-02T12:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5249#M2322</link>
      <description>&lt;P&gt;Your formula looks good, but the previous actions producing the cost values might have their output fields configured incorrectly.&lt;/P&gt;&lt;P&gt;Output data pills default to strings. So if you're using an HTTP connector to get the data, configure your cost output field to be an integer/float.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that doesn't work, then you should be able to wrap the entire formula in parentheses and .to_f its output.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 16:16:43 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5249#M2322</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-10-02T16:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5250#M2323</link>
      <description>&lt;P&gt;I tried the ().to_f but still not working&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;{&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;variables:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;{&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;3&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;schema:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;[{"name":"Total_Cost_Var","type":"integer","optional":true,"label":"Total_Cost_Var","details":{"real_name":"Total_Cost_Var"},"control_type":"integer"}]&lt;/SPAN&gt;,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;4&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;data:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;{&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;5&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Total_Cost_Var:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;((0.0.present? ?0.0.to_f : 0) +(0.0.present? ?0.0.to_f : 0) +(676.0.present? ?676.0.to_f : 0) + (0.0.present? ?0.0.to_f : 0) +(11.6366.present? ?11.6366.to_f : 0) + (.present? ?.to_f : 0) +(.present? ?.to_f : 0) +(.present? ?.to_f : 0) + (.present? ?.to_f : 0) +(.present? ?.to_f : 0) + (.present? ?.to_f : 0) +(.present? ?.to_f : 0) +(.present? ?.to_f : 0) + (.present? ?.to_f : 0) +(.present? ?.to_f : 0)).to_f&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;6&lt;/SPAN&gt;}&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;7&lt;/SPAN&gt;}&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN class=""&gt;8&lt;/SPAN&gt;}&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;------------------------&lt;/P&gt;&lt;P&gt;as far as changing the output of the search, I see where I add what fields I want to get but no where to set the output type&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 16:37:14 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5250#M2323</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-10-02T16:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5259#M2324</link>
      <description>&lt;P&gt;The formatting is a little hard to follow. Are you able to send screenshots?&lt;/P&gt;&lt;P&gt;To update the field type, you could edit the schema or just click the edit pencil and change the type using the dropdown.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Back to the formula, here are a couple examples:&lt;/P&gt;&lt;P&gt;Example 1: Three string variables with null values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_0-1696266487798.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/683iB72E59E358DFC44B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_0-1696266487798.png" alt="gary1_0-1696266487798.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Formula to add:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_1-1696266525359.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/684iC03FF2AAEB18FEA6/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_1-1696266525359.png" alt="gary1_1-1696266525359.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Formula output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_2-1696266546058.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/685i826A585C7DB7E22D/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_2-1696266546058.png" alt="gary1_2-1696266546058.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Example 2: Three string variables with actual values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_3-1696266607728.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/686iF92BC5E4F57EE62A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_3-1696266607728.png" alt="gary1_3-1696266607728.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Same formula as above is used.&lt;/P&gt;&lt;P&gt;Output of the variables (strings):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_4-1696266640825.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/687i7B02B25A74DE9005/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_4-1696266640825.png" alt="gary1_4-1696266640825.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Formula output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_5-1696266655627.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/688i09F1923985DA215D/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_5-1696266655627.png" alt="gary1_5-1696266655627.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Be careful with spacing in the Ruby formula. If you don't have a space after the second question mark, it will error. Third row below is missing a space:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_7-1696266767719.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/690i94D392F0E6F906CA/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_7-1696266767719.png" alt="gary1_7-1696266767719.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 17:13:52 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5259#M2324</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-10-02T17:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5263#M2325</link>
      <description>&lt;P&gt;&amp;nbsp;feel like I am soo close... here is my simple query to pull the fields for 1 company&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnw_0-1696268269304.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/691iAC06A162FE29CA9E/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="johnw_0-1696268269304.png" alt="johnw_0-1696268269304.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and here is the creation of the variable and using thsoe fields:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnw_1-1696268319361.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/692i53E95DDA5D30063C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="johnw_1-1696268319361.png" alt="johnw_1-1696268319361.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but when I test it it seems to be putting in the right costs but within a string of the formulas as shown here&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnw_2-1696268432875.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/693iCE38009C46BC9184/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="johnw_2-1696268432875.png" alt="johnw_2-1696268432875.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 17:41:28 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5263#M2325</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-10-02T17:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5266#M2326</link>
      <description>&lt;P&gt;You are very close &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You just need to click the "Formula" toggle on the upper right of the field. It's currently set to text mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_1-1696269766195.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/695i3CC4364C2BA566A6/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_1-1696269766195.png" alt="gary1_1-1696269766195.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 18:03:05 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5266#M2326</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-10-02T18:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5267#M2327</link>
      <description>&lt;P&gt;ok I now have topped a "I feel stupid" moment&lt;/P&gt;&lt;P&gt;thank you for all your help&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 18:30:20 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5267#M2327</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-10-02T18:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5268#M2328</link>
      <description>&lt;P&gt;Haha, it's all good. The important thing is you got there!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 18:36:16 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5268#M2328</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-10-02T18:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5273#M2331</link>
      <description>&lt;P&gt;now to that second part of making a list. When I create a search to pull the QtyOnHand field and the NonNettable Qty from a warehouse&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnw_0-1696276669087.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/696i98494631C6904747/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="johnw_0-1696276669087.png" alt="johnw_0-1696276669087.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get multiple records due to different warehouse codes&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnw_1-1696276780190.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/697i6E9025702D9D08A4/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="johnw_1-1696276780190.png" alt="johnw_1-1696276780190.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so how do I get these qtys into an List to than use in a loop and sum up? I thought the formula you just showed me was going to work till I realized there could be more than 1 warehouse code per company.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 20:02:02 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5273#M2331</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-10-02T20:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5274#M2332</link>
      <description>&lt;P&gt;What are you doing to query? One problem is that if you have 2500 items and you iterate through each one you are using 2500 tasks. I dont know about you but we get 250,000 tasks/year for a recipe. So you will run through your tasks very quickly.&lt;/P&gt;&lt;P&gt;If you are using the sql connect list or you have a connection that allows sql (e.g. snowflake, postgres, etc) you can filter out the nulls in the query and then do a sum in the query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 01:18:29 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5274#M2332</guid>
      <dc:creator>anthony_chen</dc:creator>
      <dc:date>2023-10-03T01:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5276#M2333</link>
      <description>&lt;P&gt;I did a bit more research. Unfortunately the sql collection I mentioned in my reply wont do sum. It only will let you filter out null values.&lt;/P&gt;&lt;P&gt;Normally in sql you can do something like this:&lt;BR /&gt;&lt;SPAN class=""&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class=""&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(quantity) &lt;/SPAN&gt;&lt;SPAN class=""&gt;AS&lt;/SPAN&gt;&lt;SPAN&gt; TotalQuantity &lt;/SPAN&gt;&lt;SPAN class=""&gt;FROM&lt;/SPAN&gt;&lt;SPAN&gt; your_table_name &lt;/SPAN&gt;&lt;SPAN class=""&gt;WHERE&lt;/SPAN&gt;&lt;SPAN&gt; quantity &lt;/SPAN&gt;&lt;SPAN class=""&gt;IS&lt;/SPAN&gt; &lt;SPAN class=""&gt;NOT&lt;/SPAN&gt; &lt;SPAN class=""&gt;NULL&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It looks like you need the sql transformations app to do summation. You dont get the app by default&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 01:52:41 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5276#M2333</guid>
      <dc:creator>anthony_chen</dc:creator>
      <dc:date>2023-10-03T01:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5288#M2341</link>
      <description>&lt;P&gt;thanks everyone for all the help... since the main issue on this one was solved, I have spun off this secondary question to its own post found here:&amp;nbsp;&lt;A href="https://systematic.workato.com/t5/workato-pros-discussion-board/sum-up-costs-from-multiple-companies-and-warehouses-in-epcior/m-p/5287#M2340" target="_blank"&gt;Sum up costs from multiple Companies and warehouse... - Systematic Community - 5287 (workato.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 13:03:30 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5288#M2341</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2023-10-03T13:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5631#M2486</link>
      <description>&lt;P&gt;Gary,&lt;/P&gt;&lt;P&gt;Can you explain/give an example of step #3&lt;/P&gt;&lt;P&gt;"Use the repeat helper list in a repeat action to loop 3 times"&lt;/P&gt;&lt;P&gt;I have a repeat helper list, how do I iterate through it. or update the sequence?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 17:48:42 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5631#M2486</guid>
      <dc:creator>moxiego</dc:creator>
      <dc:date>2023-11-16T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5646#M2487</link>
      <description>&lt;P&gt;No problem, let's review the &lt;STRONG&gt;Repeat Action&lt;/STRONG&gt; and the &lt;STRONG&gt;Create Repeat Helper&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here's a screenshot of an example recipe I'm going to reference:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_9-1700158617705.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/837i72E5D44BE24A9FDF/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_9-1700158617705.png" alt="gary1_9-1700158617705.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When you use the Repeat Action (Step 5), you must provide a list object as input. The length or&amp;nbsp;&lt;STRONG&gt;size&lt;/STRONG&gt; of the list informs the Repeat Action how many times it needs to repeat. If you provide a list with 100 items, it will repeat 100 times and process each item.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_0-1700157785005.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/828iC0439F74CF835029/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_0-1700157785005.png" alt="gary1_0-1700157785005.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Sometimes you don't have a list, but you only have data that&amp;nbsp;&lt;EM&gt;could&lt;/EM&gt; be a list. For example, maybe you have an array containing [1, 5, 10] in Step 3:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_5-1700158212942.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/833i934A8357B193201C/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_5-1700158212942.png" alt="gary1_5-1700158212942.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, you can't use this data or formulas as input for Repeat Action, so you need to use the Repeat Helper to prep the Repeat Action.&lt;/P&gt;&lt;P&gt;When you use the Lists &amp;gt; Create Repeat Helper (Step 4), this action takes a &lt;STRONG&gt;number&lt;/STRONG&gt; as input and returns very simple list that is basically intended to be used as input for the Repeat Action, so the Repeat Action knows how many times to repeat. Since you have an array with three items, you can use [1, 5, 10]&lt;STRONG&gt;.size&lt;/STRONG&gt; to get "3" as a result and use it as input for the Repeat Helper.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_6-1700158263623.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/834iDC034F9ADC6D78CC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_6-1700158263623.png" alt="gary1_6-1700158263623.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Doing this will create a list with 3 items to use as input for the Repeat Action. (The value of List Size in the below is "3".)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_10-1700158736288.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/838i31588A305472EFD9/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_10-1700158736288.png" alt="gary1_10-1700158736288.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use this output datapill as the input for the Repeat Action and you'll be able to iterate through your array and access its individual items.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_11-1700158751957.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/839iA8326EA76342C09F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_11-1700158751957.png" alt="gary1_11-1700158751957.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Within the Repeat Action, you have access to the &lt;STRONG&gt;Index&lt;/STRONG&gt; of the current repeat/loop. The index starts at 0 and increments +1 with every repeat.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_7-1700158371271.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/835iC1FF15E548939CB6/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_7-1700158371271.png" alt="gary1_7-1700158371271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You need to use the loop's index with the original array to access the array's individual items, like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_8-1700158494201.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/836i833BA042F5771929/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_8-1700158494201.png" alt="gary1_8-1700158494201.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For this example, the Repeat Action will loop three times, and the above action will output the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Loop 1 (Index 0) = 1&lt;/LI&gt;&lt;LI&gt;Loop 2 (Index 1) = 5&lt;/LI&gt;&lt;LI&gt;Loop 3 (Index 2) = 10&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;As a more advanced example, if you have an array of objects in Step 3 like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_12-1700158855204.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/840i3A316D59D03C4160/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_12-1700158855204.png" alt="gary1_12-1700158855204.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can access them in the loop by using bracket notation to access the key name ("number"), like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_13-1700158894221.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/841i7AC6AD81BB1842F7/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_13-1700158894221.png" alt="gary1_13-1700158894221.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This action would output the same as the original example because we're accessing the value of "number".&lt;/P&gt;&lt;P&gt;If you didn't use bracket notation to access "number", it would output the entire object, (e.g., {"number": 1})&lt;/P&gt;&lt;P&gt;You can use bracket notation to navigate more complex objects too.&lt;/P&gt;&lt;P&gt;I hope this helps! Let me know if you have other questions.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 18:24:20 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5646#M2487</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-11-16T18:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: nil can't be coerced into Float when trying to add 3 searches together</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5648#M2488</link>
      <description>&lt;P&gt;Thank you, this is super helpful.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 19:23:19 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/nil-can-t-be-coerced-into-float-when-trying-to-add-3-searches/m-p/5648#M2488</guid>
      <dc:creator>moxiego</dc:creator>
      <dc:date>2023-11-17T19:23:19Z</dc:date>
    </item>
  </channel>
</rss>

