Skip to main content

IDEAScript Questions

Dialog Box (Updating the extraction with the variables)

Hi everyone,
 
I hope you are doing great.
I have got some errors while I was updating some extraction with defined variables.
Below are some examples:
036 is character (because of leading zero)
"ENTITY" is a cloumn name (we did not define field names in the dialog box) but "sEntity" is defined for entity number.
How can I update "036" with "sEntity"?
-- task.AddExtraction dbName, "", "ENTITY == ""036"""
I tried below, for instance, but it did not work.

Processing 70 million records in iIDEA,

Greetings
I am processing 70 million records in iIDEA, the PC becomes very slow when trying to join the table that has 70 million records with the header table to get the accounting movements of a period, the question is, would I have to change the PC for one with higher processing power and more memory? Well, this union lasts approximately more than 8 hours, where I had to reset the PC and it does not make the union. The union is made between the transaction account and the header account.
what dou you recommend ?

Global variable for all functions in a macro

Hi,
I need two variables that can be used in the two different functions within my macro, but instead of defining the variables within each function, I would like to define them at the begining and make them usable for all functions, but I cannot make it work. Somebody that has done this before? Thanks
 
Sub Main
'define variables  
Dim Qtr As String
Dim FY As String
Qtr = "Q4"
FY = "21"
 
Call TopNExtraction()'T&E Report - Q4 FY21.IMD
Call AppendField()'T&E Report List.IMD
End Sub

Sort Excel Column

Hello all,
 
I have been trying to sort a column from an excel file.  I have a bit of code that is able to do number formatting as well as other formatting but I cant find anything that is for sorting.  The one thing that I did find wants to use Range and I am getting errors when I run the script.
 
Here is what I have so far.  I have also tried to use oSheet.Range.  Any help would be greatly appreciated.  Thanks!
 
Set oSheet = oBook.Worksheets.Item(1)

Create a new column from another with replace function

Hi,
 
I would like to create a new column out of another one. I have one column which contains text. For example an address. Now I want to replace certain parts within this string. For example I want to remove "AND". So replace "AND" with "".
 
 
So the field address contains "Road 1 and Plaza" and the new created field temp1 should contain "Road 1 Plaza".
 
I use the replace function mentioned here:
https://ideascripting.com/node/71
 

Erroneous or misleading code snippet?

Dear Brian,
While googling I found the following code snippet on this website:
https://www.ideascripting.com/wiki/check-if-field-exists
It should be a code snippet that basically checks if a field exists or not. So I would expect that if that function returns true it does exist and if it returns false the field does not exist. However, the code snippet is wrong/misleading:
Set field = table.GetField(sFieldname)