Skip to main content

IDEAScript Questions

Call a script within another script

Hi all,
 
Can you call a Script within another script?
I have a Script that is >10.000 lines long. When I wanted to add new code the last time I got the message "symbol table is full". From that message I assume there is a limitation to the total length of one Script.
 
My idea is now to make a Master Script that calls different sub scripts. Is there any way to do this?
 
Best Regards
Steve

Add a user prompt for criteria?

Hi all, I am very new to IDEAScript/Caseware and I searched the forums before posting this question:
For the following code I want a dialog box that will pop up to ask the user for the dates rather than having to manually change it in the code; how to go about that?
 
Function DirectExtraction
Set db = Client.OpenDatabase("PY_POPSDATA2.IDM")
Set task = db.Extraction
task.IncludeAllFields
dbName = "PY_POPSDATA.IDM"

Check if a field is already there

Hi everyone,
 
is there any way to check whether a field is already contained in a database?
I want to check if a field is there and if not it appends the field. I tried table.getField, but this results in an error.
 
Here is the part of my code I mean:
Dim table As table
Dim field As field Set db = Client.OpenDatabase (dbname)
Set task = db.TableManagement
Set table = db.TableDef
 
Set field = table.getField("DUMMY_NAME") - This will result in an error if the field is not there

correct Syntax of Input

Hi,
I came across an inconsistency in the scripting Doku of IDEA 8.5 (in german)
a) Objectcatalog : Input[$](Chars As Long, #FileNum As Integer )
b) Tooltip : Input(By Val Number as Integer, By Val FileNumber as Integer) As String
I get the error message:
 
'Error in Line 41 -  Overflow
 
Line 41 >> Contents2 = Input(Lange2, Filenum)

delete a record from a Database

Hi,
I would like to add or remove records from an IDEA Database. That Data is used for Comparison and so it's OK to edit it. My Comments is in German but the Code works a bit. I ask the user to supply a Numer (NR_V) and then "delete" that record. Actually it is not deleted but it is "cleared". The line is empty then. I close an re-open the database to invoke a GUI update, then I extract the with NR_V >= 1 th get rid of the one cleared line.
I have 2 Problems:
a) My script only works one time. Maybe I need to re-index??? How can I do that?

Export to Excel Quickly?

Hello Everyone,
I use IDEA frequantly and our end product always has to be in excel file. Is there any quick script I could put together which exports the currently active database into an excel spreadsheet on my computer without any dialog boxes? I would like the xlsx file to just retain the name of the active database open (.imb file). I recorded a scripted, but honestly, am not very good with scripting. 
Could someone help me to modify it? I feel like 85% of the code is already there.
<code>
Sub Main

Error 52 "Due to an internal error..."

Hi there,
Firstly, I've got a huuuuuuuuuge script here (11k+ lines of code) so I will not post the whole in this thread. ;)
Anyway, the problem, that I've got with my script, that I randomly get a "Errornumber: 52,"Due to an internal error, the Project Overview information for this task was not recorded."". Lets say, I will run the script five times, three out of this five times, work perfectly, one throws the mentiond error, pretty often followed by a "Bad file name or number", and the other time simply crashes IDEA.