IDEAScript Questions
Create Mask for the function gap detection
Forums
I created a script for the gap detection and build some code so that would check if a letter from a string is numeric or not. I got it working but what i don't understand is that every space, dot en minus sign is recognized by the IsNumeric function als numeric. Why is that? I would expected that only number would be a valid numeric.
- Read more about Create Mask for the function gap detection
- 1 comment
- Log in or register to post comments
Array data
Forums
I created some code to import a txt file and remove the " symbol from the array:
Function ImportText1
Const fsoForReading = 1
Dim objFSO
Dim objTextStream
Dim FirstTime As Boolean
Dim FileName As String
Dim i As Integer
FileName = WorkingDirectory & "\Exports.ILB" & "\Temp1.DEL"
FirstTime = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextStream = objFSO.OpenTextFile(FileName, fsoForReading)
Do Until objTextStream.AtEndOfStream
- Read more about Array data
- 8 comments
- Log in or register to post comments
Select fields in a separate dialog
Forums
For some reason I can't get the script working, it keeps crashing at Pushbutton 3 of the DialogSelectFields1A function (line 432). Can you please take a look, i first thought it would be the Dim/Redim would be reversed but thats not the case.
- Read more about Select fields in a separate dialog
- 3 comments
- Log in or register to post comments
Listbox
Forums
I know how to get fieldnames in a list, but is there a way to get the content of a field in a listbox? (Such as debtor names or general ledger ID's)
Update:
I got to the point to summarize the selected field (general ledger ID) and export only the content of that field to a txt file and then import it.
Open WorkingDirectory & "\Temp.DEL" For Input As File1
Line Input #File1, Contents
MsgBox "The file contains: " & Contents
- Read more about Listbox
- 7 comments
- Log in or register to post comments
Summarization function
Forums
In the summarization function IDEA wants to know what statistics functions to use. When all are selected the code is as follows: task.StatisticsToInclude = SM_SUM + SM_MAX + SM_MIN + SM_AVERAGE + SM_VARIANCE + SM_STD_DEV
I created check boxes in a dialog menu so the user can select the statistics function they want to use. The check boxes are set as boolean, but i added a If function that when a statistic function is selected (example sum) a variable (sting) is set with SM_Sum and if not it is set to "".
- Read more about Summarization function
- 7 comments
- Log in or register to post comments
Creating a number of variables
Forums
Is there a way to let the user define a number and than the script creates that number of variables (dim as string)? I thought i would be something likes this:
Option Explicit
Dim LimitQ As String
Dim i As Integer
LimitQ = 5
For i =0 To LimitQ
Dim Limit(i) As String
Next i
Sub main
End Sub
- Read more about Creating a number of variables
- 12 comments
- Log in or register to post comments
Dropdown menu with fields
Forums
I want to create a dropdown menu with the fieldnames. In my test script (Test fields to dropdown menu works) it works but in my project script (RB Temp 1) it doesn't work. What do i wrong? I want to understand how the basic code is to populate a list and show it to the user.
- Read more about Dropdown menu with fields
- 13 comments
- Log in or register to post comments
Using displayIt instead of dialog
Forums
I'am trying to understand how to work with the function displayIt and the select case Action% and select case ControlId$. But i can't get it working on a simple script, what do i wrong? :
-----------------------------------------------------------------
Begin Dialog MainMenu 50,50,150,150,"NewDialog", .NewDialog
CancelButton 93,109,40,15, "Cancel", .CancelButton1
OKButton 9,110,40,14, "OK", .OKButton1
PushButton 66,20,40,14, "Get File", .PushButton1
End Dialog
Option Explicit
Dim Exit_Script As Boolean
- Read more about Using displayIt instead of dialog
- 13 comments
- Log in or register to post comments
task.ValueType set from dialog
Forums
In some functions of IDEA some tasks are set with TRUE of FALSE and one (task.ValueType is set as POSITIVE_VALUES or NEGATIVE_VALUES). I would like to set this in the script based on the input of the user. I got a button with both variants from which the user needs to select one. But i can't get it working. What sort of code do i need to use?
- Read more about task.ValueType set from dialog
- 3 comments
- Log in or register to post comments
Looping a macro
Forums
A little background: I worked monthly with 24 individual files which I ultimately append together in IDEA but when I import all of them they don't always import with the consistent field types (e.g. character, numeric, etc.). Therefore I end up having to go into each of the files and update accordingly so I can then append them all.
- Read more about Looping a macro
- 1 comment
- Log in or register to post comments