IDEAScript Questions
Canceling a macro on error
Forums
I stack all my macros together and use a "master" macro to run them sequentially. It allows me to simplify and compartmentalize the code. The problem is if I get an error. The code continues to run from the master program. Any suggestions on how to stop it? Below is a snippet of the macro that runs the other macros.
Thanks,
Randy
ProjectLocation = Client.WorkingDirectory()
- Read more about Canceling a macro on error
- 1 comment
- Log in or register to post comments
Use Extraction with XXL-Criteria
Forums
Hi!
I want to create a script that extracts a table with a consistent field structure based on a key.
The user selects the keyvalues from a list that should be excluded during extraction.
This selection is temporarily stored in an array of string.
For l = 0 To UBound(asSelected)
sAcct = iSplit(asSelectedGewaehlte(l),""," - ",1)
If sCrit <> "" Then
sCrit = sCrit & " .AND. ACCT<>" & Chr(34) & sAcct & Chr(34)
Else
sCrit = "ACCT<>" & Chr(34) & sAcct & Chr(34)
- Read more about Use Extraction with XXL-Criteria
- 2 comments
- Log in or register to post comments
Calling a script within a script
Forums
Hi Brian,
I hope all is well with you.
I'm trying to combine two scripts as follows:
Script A is a standalone that is used regularly.
Script B will not be used often, and it's starting point is the final file produced by Script A. It is not standalone.
I will need to update Script A from time and therefore I think it is better to call it at the beginning of Script B.
(I think this is sensible, as if I paste it into the start of Script B then I would have two files to update).
I have this working fine, except for one problem.
- Read more about Calling a script within a script
- 5 comments
- Log in or register to post comments
Help importing multiple PDF files without naming them applying a tfm template and then appending them
Forums
Hey! I have many pdf files named differently. I’d like to find a way to loop through all of them without having to name each of them individually (there are too many of them) and then append them all. I already saw Bryan’s post about how to sort of do this but I’d have to name each file and since I have like fifty of them, I’d like to find a quicker way to do it without naming each of them.
Thanks!
Adding Working Days to Date
Forums
I am trying to find a way to add working days to a month end date. Ultimately I want to figure out if a date in my database is greater than 4 business days from the end of the prior month. Does anyone have any tips on how I can do this? Thanks!
- Read more about Adding Working Days to Date
- 9 comments
- Log in or register to post comments
"Unpivoting" Data
Forums
I have imported into IDEA an excel file with about 100 columns. The first row in each column is a reporting entity, then the remaining rows are all the allowable values for that reporting entity. When importing this file into IDEA, all reporting entities become field names and the allowable values are all the values in that field.
- Read more about "Unpivoting" Data
- 1 comment
- Log in or register to post comments
convert unix time string
Forums
Hi,
I have created an IDEAScript that searches through an external folder for certain parts of filenames.
The names of the log messages are always in format
info1_info2_info3.log
In other words, i created a IDEAScript Macro that splits the filnames by separator _ to determine the values and write them to a CSV file.
One of the areas e.g. info1 contains allways a UNIX timestamp in seconds starting from 01/01/1970 00:00:00.
- Read more about convert unix time string
- 3 comments
- Log in or register to post comments
Get numeric value from other database instead of Join
Forums
Hi,
Can you help me with a script to obtain a value from other table, or populate a temporal array obtaing values fromo other table using a common code_type field on both tables as criteria to search value range
I have a Account Receivable, and need to obtain a percent value from other table (table B) using the client_type and age_range (lets say 90 days) from table A, so I need to search wath %value has the table B comparing the client_type.
Example
Table A
Type : 3, age: 500 days
Array
Forums
Hi Brian
I wish you the vest best for the future. I was just wondering if there is any update in relation to the query (using an array to identify the length of time that products sold had been held in stock using the LIFO method) That I had raised with you back in February.
Thanks
Karl
- Read more about Array
- 1 comment
- Log in or register to post comments
Inputbox string - remove special characters
Forums
Hi Brian,
I'm back again :-)
I'm running a script and I would like user to be able to enter a case reference which is stored as a string.
Much later in the script this will be used to create an output filename.
The following lines allow me to get the input, tidy it a little, and then pass it to create the filename.
caseref = InputBox("Enter your case reference", "Case Reference", " ", 815,475)
caseref = UCase(LTrim(Left(caseref, 20)))
dbName = pfolder &"\Calculations for" +caseref +".IMD"
All of this works without any problem.
- Read more about Inputbox string - remove special characters
- 3 comments
- Log in or register to post comments