Skip to main content

IDEAScript Questions

Function age

Hello,
 
I have a problem with the function @age in Ideascript. When I execute the following code, IDEA crash.
Function DatePiece
    Set db = Client.OpenDatabase(dbname)
    Set task = db.TableManagement
    Set field = db.TableDef.NewField
    field.Name = "ECARTDATE"
    field.Description = ""
    field.Type = WI_VIRT_NUM
    Dim a As String

Running a script on multiple databases before appending

Hi Brian,
I've got two scripts that I'd like to combine to create one process. My goal is be able to categorize each database in a .IDM file (unicode) by appending a field with the first number in each database name before appending all the databases together. Using some other scripts I've found and tweaked, I have the two separate codes I need, but I'm not sure how to put them together.  Any help you could provide would be appreciated.

Find the group that exceeds...

Hello, I have a question regarding IDEAScripting. This is something that I can easily do on SQL but I haven't managed to find a solution for this using IDEA.
 
Given the sample data on the attached image, I am looking to find a group of transactions, within 5 days from eachother, which sum of amount is above 5000.
 
For the given data it would be the transactions on the following days:

Shell function

Hi all,
I have read some scripts writing about import multiple files and there is a part about Shell function that I am not clear. For example
 
Function BrowseFolder()
Dim oFolder, oFolderItem
Dim oPath, oShell, strPath
Dim msg As String
Set oShell = CreateObject( "Shell.Application" )
Set oFolder = oShell.Namespace(17)
Set oFolderItem = oFolder.Self

Import file and append to database in one go

Hi all,
I need to import a very large number of files and append them into one master database.
I have written a simple script to import the files, and another simple scripte to append them into one database. So, I can just run the two scripts one after the other and be done.
However, due to the very large number of files (>500k), I am a bit  worried about performance: IDEA needs to 'open-read-write-close' the files twice: first for the import-routine and then for the append-routine.

Loop multiple exports

I got like 24 export to excel files, i want to loop the call function with export1, export2 until export 24. When i use the code below i get the result in a message box correct but with the call function i get an error unexpected array. Do i miss something?
Dim Q As String
Dim Func As String
Q = 24
For i = 1 To Q
Func = "Export" & i
'MsgBox Func
Call Func
Client.CloseAll

Fill Down Macro within an IDEAScript

Hi all - as always, thanks in advance for the help!
I use the Filldown Utility from the IDEAScripts section of the site all the time. What I'd like to do is incorporate that functionality into another script I've built that does some file cleanup on a standard file I receive frequently. But, I want to skip the dialogue box to select the fields to fill down and instead have a defined list of ~5 fields to run. How would I do that?

Scripting for a field selected by the user in a dialogue box

Can Anyone PLEASE help me !
I am attempting to make a dialogue box where:1) The user selects a database2) Selects upto 15-20 feilds from a drop down which are mapped in my report.3) The fields the user selects are then renamed(modified) to a particular name.4) I have a generlaised script that will then, run for further analysis basis those new fields names. The problem i am facing is - How do i script the following: