<?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: Error calculating input for field 'fieldName': no implicit conversion of nil into String in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5930#M2603</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/9855"&gt;@snm&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;One possible reason you are getting an error is that the data pill used has an empty value.&lt;/P&gt;&lt;P&gt;The error indicates that it was unable to move forward with the conversion/formula is because the value is empty of doesn't match the data type being used in the formula.&lt;/P&gt;&lt;P&gt;Check if step 3 has a value on the job output. One suggestion for troubleshooting is to try using a static value to see if the error reproduces.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 06:02:21 GMT</pubDate>
    <dc:creator>marlon-muela</dc:creator>
    <dc:date>2024-01-10T06:02:21Z</dc:date>
    <item>
      <title>Error calculating input for field 'fieldName': no implicit conversion of nil into String</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5890#M2589</link>
      <description>&lt;P&gt;I'm troubleshooting a job failure with the error:&amp;nbsp;&lt;SPAN&gt;Error calculating input for field 'fieldName': no implicit conversion of nil into String.&lt;BR /&gt;I understand that the likely cause of this error is due to a + operation trying to act on a nil value from the input data. And the use of .present? or .presence could help mitigate the problem. But I am not sure how to factor that into the formula:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snm_0-1703778263924.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/950i279EE2300A8507AC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="snm_0-1703778263924.png" alt="snm_0-1703778263924.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any help or guidance would really be appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 15:44:48 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5890#M2589</guid>
      <dc:creator>snm</dc:creator>
      <dc:date>2023-12-28T15:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error calculating input for field 'fieldName': no implicit conversion of nil into String</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5891#M2590</link>
      <description>&lt;P&gt;As a side note, without seeing the whole recipe I wonder if this complex formula is the best way to go.&amp;nbsp; It seems like you're dealing with a lot of things in one formula and perhaps it could be done more dynamically through adding some other steps or even custom ruby code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming it is best to keep it this way (or either way) I would look at adding the Safe Navigation Operator right at the beginning after the Custom Fields data pill.&amp;nbsp;&lt;A href="https://docs.workato.com/formulas/conditions.html#safe-navigation-operator" target="_blank"&gt;https://docs.workato.com/formulas/conditions.html#safe-navigation-operator&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 16:20:39 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5891#M2590</guid>
      <dc:creator>dcornwell</dc:creator>
      <dc:date>2023-12-28T16:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error calculating input for field 'fieldName': no implicit conversion of nil into String</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5892#M2591</link>
      <description>&lt;P&gt;Thank you for your response! I am not the owner of the recipe and therefore cannot make any changes on my own. The custom fields data pill is actually a list and I tried adding the safe navigation operator but it still threw an error.&lt;BR /&gt;&lt;BR /&gt;This time:&amp;nbsp;&lt;SPAN&gt;Error calculating input for field 'BusinessUnitRefID': no method 'where' for true&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 16:33:20 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5892#M2591</guid>
      <dc:creator>snm</dc:creator>
      <dc:date>2023-12-28T16:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error calculating input for field 'fieldName': no implicit conversion of nil into String</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5893#M2592</link>
      <description>&lt;P&gt;The error message you provided doesn't appear to pertain to the screenshot/formula. "fieldName" is not present in the formula. I'm guessing that the output of "Business Unit Ref ID" is being added in "fieldName" elsewhere. What does that formula look like?&lt;/P&gt;&lt;P&gt;In your response above to dcornwell, you mention a new error: "&lt;SPAN&gt;Error calculating input for field 'BusinessUnitRefID': no method 'where' for true". This is interesting because it appears that the value for "Custom fields" is expected to be an array of objects, but is arriving as a boolean (and you can't .where a boolean). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Without knowing more, I could only classify this as "very odd" and I recommend looking at the input data first. If the input data is arriving in an unexpected format, that may be the root cause of the formula backfiring. Once you confirm the input data is correct, read on for a suggestion on&lt;/SPAN&gt;&amp;nbsp;fixing the issue.&lt;/P&gt;&lt;P&gt;When any of the where methods return no results, you'll hit an error. This is because the other methods used to transform the result (upcase, '+', split, gsub) are string methods that will not work on nil data types.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you really want to retain the formula as is without rewriting it into a Ruby snippet or multiple actions, I recommend first checking for the value before transforming it like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;## test to see if a result is present without transforming
(([Custom Fields].where("Name": "xxx").pluck('Value').first.present? : 

## now transform and test each case in a callback hell of nested ternary operators

   (([Custom Fields].where("Name": "xxx").pluck('Value').first.upcase.include?("xxx") ? 
   "result when true" : 

      ## next ternary operator here
      {test condition} ? {true result} : 

         ## next ternary operator here
         {test condition} ? {true result} : 
   
   ## ... and so on until the end of time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: I should also mention that if the .where("Name": "xxx") is&amp;nbsp;&lt;STRONG&gt;always&lt;/STRONG&gt; testing for the same name "xxx", you can check for presence &lt;STRONG&gt;once&lt;/STRONG&gt; at the beginning of the formula. However, if the formula checks for multiple names throughout the formula (I can't tell, they are blurred), then you'll need to test for presence each time (for each name) at the start of a new nested ternary operator. I'm getting dizzy just thinking about it!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 17:42:23 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5893#M2592</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-12-28T17:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error calculating input for field 'fieldName': no implicit conversion of nil into String</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5894#M2593</link>
      <description>&lt;P&gt;Thanks for your response, gary1.&amp;nbsp;&lt;SPAN&gt;BusinessUnitRefID is the field that this formula is populating. I mistakenly typed 'fieldName' in my initial post where it is meant to be 'BusinessUnitRefID'. So the error would read:&amp;nbsp;&lt;STRONG&gt;Error calculating input for field 'BusinessUnitRefID': no implicit conversion of nil into String.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;And you're right about Custom Fields, it is an array of objects. I'll attempt your suggested approach. Thank you once again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 17:50:31 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5894#M2593</guid>
      <dc:creator>snm</dc:creator>
      <dc:date>2023-12-28T17:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error calculating input for field 'fieldName': no implicit conversion of nil into String</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5930#M2603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/9855"&gt;@snm&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;One possible reason you are getting an error is that the data pill used has an empty value.&lt;/P&gt;&lt;P&gt;The error indicates that it was unable to move forward with the conversion/formula is because the value is empty of doesn't match the data type being used in the formula.&lt;/P&gt;&lt;P&gt;Check if step 3 has a value on the job output. One suggestion for troubleshooting is to try using a static value to see if the error reproduces.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 06:02:21 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5930#M2603</guid>
      <dc:creator>marlon-muela</dc:creator>
      <dc:date>2024-01-10T06:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error calculating input for field 'fieldName': no implicit conversion of nil into String</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5937#M2608</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/1536"&gt;@marlon-muela&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you for your response and apologies for not reverting back on this thread sooner. Yes, ultimately the issue was found to be a null value being returned from the lookup table due to a match not existing. This was causing the string concatenation to throw an error and fail the job.&lt;BR /&gt;&lt;BR /&gt;Big thanks to you,&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/1188"&gt;@gary1&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/6194"&gt;@dcornwell&lt;/a&gt;&amp;nbsp;for all your time and assistance!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 16:02:39 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/error-calculating-input-for-field-fieldname-no-implicit/m-p/5937#M2608</guid>
      <dc:creator>snm</dc:creator>
      <dc:date>2024-01-10T16:02:39Z</dc:date>
    </item>
  </channel>
</rss>

