Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Error message: string provided where a number is required.

JoeBarndollar
6 - Meteoroid

Hi all,

 

I am trying to build an iterative macro for repayments on outstanding loan balances and I keep running into the following error when I run a workflow that contains the macro:

 

JoeBarndollar_0-1601316110120.png

 

Tool 17 is a formula tool with the following argument:

 

JoeBarndollar_2-1601316407107.png

 

 where all three fields are a "double" type.

 

The tricky part is that when I simply run the macro, the process works as expected. But when I run the broader workflow, the error is thrown.

 

I have double checked and the data type in the macro is the same type as the data type in the workflow, but obviously I am just missing something. Can anyone point me in the right direction?

 

Thanks. 

3 REPLIES 3
ImadZidan
12 - Quasar

Hello @JoeBarndollar ,

 

it is difficult guessing here without seeing the data in action.

 

Could it be that you have null values in ur data.

 

Can you try wrapping you if condition with tonumber.

 

So, it will look like If tonumber([Residual Loan/Repayment],3)<0 then ....

JoeBarndollar
6 - Meteoroid

It is possible that there could be nulls in later iterations of the macro.

 

I tried wrapping the fields in the formula tool as well. It results in the same error again. However, if I delete the negative sign in the formula, then the error changes to:

 

JoeBarndollar_0-1601320305162.png

 

This references a filter tool further in the Macro which filters the "amount of loan" field based on the value being positive or negative. 

 

Apologies, but I can't share the workflow. I would be happy to send any screenshots.

 

Thanks,

 

Joe

JoeBarndollar
6 - Meteoroid

Hi, 

 

I followed the logic of wrapping my values with "tonumber" and that led me to delete and reinsert a few tools that referenced the "amount of loan" field (as these tools must have had a bug in them). 

 

The macro works now.

 

Thanks for your help.

Labels