Bad equation provided on "task.PerformTask 1, db.Count"

7 posts / 0 new
Last post
justidea's picture
justidea
Offline
Joined: 01/30/2016 - 10:18
Bad equation provided on "task.PerformTask 1, db.Count"

I am trying to write a script for nested direct extractions and I name each extraction with a number included for which number in the sequence of nested extractions it is.  For example, I run an extraction on a database and call is EXTRACTION1, then I run a second extraction on EXTRACTION1 and call it EXTRACTION2.  When I get to the double digits of numbers I get an "Error on line 88 - bad equation provided".  On that line is "task.PerformTask 1, db.Count".  In other words, when I get to doing EXTRACTION10, the aforementioned code returns an error.  I'm not sure what that code does, I'm new to scripting.
Do you have any idea why this might happen and how I can fix it?  
Thanks.  

justidea's picture
justidea
Offline
Joined: 01/30/2016 - 10:18

Never mind, it appears related to separate issue, and I fixed it, thanks.
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi justidea and welcome to the site.

Glad you were able to fix your problem.  What happened here is IDEA is showing the error where the script is telling IDEA to perform the extraction but in actual fact the error, from your error message, was probably a syntax error in your equation.

Brian

justidea's picture
justidea
Offline
Joined: 01/30/2016 - 10:18

Oh I see.  The line number seemed a little misleading, but I think I get it now.  Thanks.

Sasak90
Offline
Joined: 08/02/2019 - 03:42

Hi Brian,
I am getting the same error and I have tried everything.
I did not create the script/macro and the person who created it is not on leave. We got the same error last month but the source was the changes in the fields on the report. I compared the fields and nothing has changed. What could be the reason for the error?
Regards,
Mosa

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

If it says it is a bad equation then check the equation to make sure it is working, are the fieldnames correct, is the syntax correct.  Try doing it manually and then going into the history and comparing the equation in the history with the one in your script.

Sasak90
Offline
Joined: 08/02/2019 - 03:42

I have checked the history and the script backup. Nothing was changed on the fields either. I compared to previous reports and nothing changed either. But I will check again just to make sure. Maybe I missed something.