Skip to main content

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.  

Brian Element Sat, 01/30/2016 - 13:02

In reply to by justidea

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

Sasak90 Fri, 08/02/2019 - 03:52

In reply to by Brian Element

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 Fri, 08/02/2019 - 07:02

In reply to by Sasak90

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 Fri, 08/02/2019 - 08:14

In reply to by Brian Element

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.