IDEAScripting Tips and Hints
Post for tips and hints on how to use IDEAScript.
How to update an IDEA ".ise" Script
Forums
Hello,
I am not a programer, but I use IDEA quite a lot at my work. I have a very useful IDEA script that I use to import multible Excel Files in the same folder, with the same file layout inot IDEA.
the Script has an extension of .ise, which dosn't enable me to open it. I am only able to Run it from the macros menu in IDEA.
I like to be abe to open this script in IDEA, so I can understand how it works, and may be make some changes to it, to be able to do more.
how can I do that?
- Read more about How to update an IDEA ".ise" Script
- 1 comment
- Log in or register to post comments
Seperate number columns into date
Forums
I had three number columns that I needed to concatenate as a date field. Here is what I figured out:
Appended a column, virtual date, and the following formula which concatenates and turns the number fields (@str) into a character field THEN "Character to Date":
@Ctod((@Str(MO,2,0)+@STR(DY,2,0)+@Str(YR,4,0)),"MMDDYYYY")
It provided the following date:
"mm/dd/yyyy
- Read more about Seperate number columns into date
- 1 comment
- Log in or register to post comments
New IDEAScript available for Unlimited Key eXtraction
Forums
Key Value Extraction option of IDEA shows only the first 500 keys. This script extracts unlimited number of keys.
Available here: http://ideascripting.com/ideascript/unlimited-key-extraction-ukx
- Read more about New IDEAScript available for Unlimited Key eXtraction
- Log in or register to post comments
Generate Field Statistics
Forums
I am writing a scipt to calcualte some ratios and am using the fieldstatistics funciton @FieldStatistics( "column 1 ",6 ). When i run the procedures as a script i am getting an error because field statistics have not been generated on the database prior to the calcualtions. Is there a command that i can use within idescript that will generate fieldstatistics?
- Read more about Generate Field Statistics
- 1 comment
- Log in or register to post comments
Unique Filename for Key Value Extraction
Forums
I was creating a script using the Key Value Extraction and I wanted to use a unique filename. In this test it takes a prefix (task.DbPrefix = "new filename") and will return the final filename. I tried using the client.uniqueFilename which returns a unique filename but it this instance it doesn't like it because it also gives the path information and the extension so I came up with this work around. I use the client.UniqueFilename and then remove the path information by using the iSplit function (a function available in the equation editor) and I then remove the extension
- Read more about Unique Filename for Key Value Extraction
- Log in or register to post comments
Adressing functions dynamically
Forums
Hi Brian,
your website has been really succesfull in helping me out with several IDEA issues. Thank you so much. However, I didn't find so far a solution to call functions dynamically (Call functions with the names: Function1, Function2, Function3 ...). Therefore I wanted to ask, whether you know a function (similar to VBA Excel's Eval) for sth like this (see also file):
Dim CurrentFunction as String
For Counter=1 to 5
CurrentFunction= "Function" & Counter
Call Eval(CurrentFunction)
- Read more about Adressing functions dynamically
- 2 comments
- Log in or register to post comments
Using the Type Function with Arrays
Forums
I found this out by playing around with it but you can use the Type function within an Array. For a refresher the type allows you to create a data type containing one or more elements. You then use it as a dot variable, in the example below I have created a type that holds three elements, the last name, first name and middle initial. I have grouped them all together in a type function called FullName. To access the type you would define a varialble such as Dim ClientName() as FullName for an array or Dim ClientName as FullName for a single variable. To set
- Read more about Using the Type Function with Arrays
- 2 comments
- Log in or register to post comments
Defining Variables
Forums
In IDEA if you use the option explicit it will force you to define a variable by using the Dim statement. If you don't define a variable, all the variables are defined as variants. Also IDEA allows you to place several variables on the same line such as:
Dim myString1, myString2, myString3, myString4 as string
- Read more about Defining Variables
- Log in or register to post comments
Removing the content of the current workspace
Forums
Hi Brian,
First of all, thank you again for your website.
Do you have a script for removing the current content of the workspace ?
Thank you in advance.
Kind Regards,
Mourad.
Importance of refreshing your data
Forums
When developing a script you are probably running it multiple times at the very least and for a large script it may be in the hundreds of times that you run it and test it. If the script is making changes to a database, such as creating fields, deleting fields, etc you might want to refresh your database every once in awhile. I have had several occasions (this morning was one of them) where I was working with a fairly large script, part of the script created a number of virtual fields in one of the database. So when I ran the script this morning and starting getting strang
- Read more about Importance of refreshing your data
- Log in or register to post comments