Skip to main content

IDEAScript Questions

Extract unique records into a new database

Good morning,I'm new to the site but also to programming. I train myself on the creation of scriptIdea in order to automate repetitive tasks. Inspired by messages found on your site, I tried to develop the following script to 1) write information in a virtual field to determine unique records based on an ID and a date of action(oldest) see extract unique records directly into a new file. Nothing works. Despite

Search variable keyword in column with @isini()

Hi IDEA friends!I want to add a variable to the script that can be set by the script user. 
Sub Main
...
 
Keyword1="test"
Keyword2="test2"
Keyword3="test3"
Keyword4=""
Keyword5=""
...
Keyword15=""
...
End Sub
 
The corresponding function:
Function Risk_Summary (Keyword1, Keyword2, Keyword3)
Set db = Client.OpenDatabase("XY.IMD")
Set task = db.TableManagement
Set field = db.TableDef.NewField
field.Name = "KEYWORD"

How to back to main menu

I have three dialog ( include main menu (displayit)).
I try to close second dialog and close third dialog at the same time. than back to first dialog.
But I failed...
however i can close third dialog and close second dialog at the same time by do some trick with the button (in second dialog) which open the third dialog.
Please tell me how can i do. 
 
 
Thanks 
Dorian

IDEAScript editor randomly destroying my variables

Hi all
 
I've got a weird issue with the IDEAScript editor when working on my script to do ODBC imports.
 
Using the below example of my function to import a general ledger, if I run the script it works 100% perfectly, giving me exactly the data I need. But if instead I open in IDEAScript editor then my query(0) line gets wiped out entirely and replaced with an exact copy of the line above it (ie: table = "PostGL")

array to hold multiple fields

Hi all
I've had a look at the script here to get an idea of how to hold multiple fields in an array
https://ideascripting.com/snippet/array-hold-all-field-information
 
Tried adapting it to my own script, attached (quite new to this so sorry if my script is hideous)
note I've trimmed out some of the stuff from my script like menus/functions that aren't applicable to this question
 

Check if excel workbook is open

Hi Brian,
 
I hope you are well.
 
I'm running a macro that creates an excel output file.
 
If the macro has been run previously, and the user has that excel output file open, the macro will crash when it tries to export.
 
To avoid this, I would like to use my script to check if any previously exported excel file is open.
 

Filling in missing records

Hi everybody,
 
I have table A with columns "CustomerNo.", "Period" and "Amount" that has ~ 5M records.I need to calculate a rolling total over a period of 12 months before "Period".
Problem is that I don't have one record per Customer per Period, but I am missing months for most customers.
Is there a smart way of joining the data in IDEA to create the missing records and let me calculate the Rolling Total (https://www.ideascripting.com/forum/running-total)

tagging a file as "GeneralLedgerDetails"-file

Hi together,
I have the following problem:
In Germany we use IDEA11 with the SmatrAnalyzer. Included is the main module "Auswahl und Durchführung von Prüfungsschritten" where You have several audit routines, which are tagged with special IDEA-Tables (especially "Standardjournal" = GeneralLedgerDetails).
 
Is there a possibility to tag a new table via IDEA Script as file that has all fields, necessary for a "GeneralLedgerDetails"-file?
 
Thanks
Martin