• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Recipe Error Troubleshooting
S

Saul Macht

started a topic over 6 years ago
Answered

Formula mode error when 'adding' data pills together using '+'

Hi, I was using a formula like this (data1 + data2 + data3) when I encountered some error messages..


image


Error messages:

1. No implicit conversion of nil into string error

2. Formula received a nil value: undefined method `+' for nil:NilClass


I received the errors on different jobs. One of them had null value in description, the other had null value in amount. I thought that if a data pill was empty/null, then the empty pill would be passed. 


Best Answer
C
Chandra Vippena said over 6 years ago

Hi Saul,


While using + operation on data pills, If any of the data pill expecting to be empty or nil, It should be handled explicitly by using present? or presence. 

Always, when using + with data pills for concatenation, it is a method call. so It tries to evaluate data pills and then concatenate. You have to make sure that pills on both ends should not be nil or empty.

Answer
C

Chandra Vippena

said over 6 years ago

Hi Saul,


While using + operation on data pills, If any of the data pill expecting to be empty or nil, It should be handled explicitly by using present? or presence. 

Always, when using + with data pills for concatenation, it is a method call. so It tries to evaluate data pills and then concatenate. You have to make sure that pills on both ends should not be nil or empty.

Amanda Wong

said over 6 years ago

You can also refer to this solution article on how to use .present? to handle such errors

Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count