IDEAScript Questions
Global variable for all functions in a macro
Forums
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
- Read more about Global variable for all functions in a macro
- 4 comments
- Log in or register to post comments
Substitute the dates captured in the form.
Forums
I have an oracle database, and I need to extract the records from a table with the built-in idea odbc. the question is how do I substitute those form dates in the odbc import
example
bName = "tca_xxxIMD"
- Read more about Substitute the dates captured in the form.
- 2 comments
- Log in or register to post comments
Sort Excel Column
Forums
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)
- Read more about Sort Excel Column
- 1 comment
- Log in or register to post comments
Create a new column from another with replace function
Forums
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?
Forums
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)
- Read more about Erroneous or misleading code snippet?
- 2 comments
- Log in or register to post comments
PDF export function
Forums
Good morning everyone, I am trying to develop a script to export a file, but I get some messages like overwrite the existing file or adjust the columns of the pdf, I would like to know how I could add code to always select that If in the popups.
Thank you very much
- Read more about PDF export function
- 1 comment
- Log in or register to post comments
closing a Dialog Box
Forums
Hello,
thanks to the youtube tutorial i managed to create my first dialog box.
Depending on the selection, a script is started through the dialog box.
The selected script itself takes about 5 minutes to complete. It is possible to close the dialog menu before completing the selcted script and not afterwards?
Or maybe lower the showing level, it is allways the front window when i use other programs / windows.
thx for helping me
Torsten
- Read more about closing a Dialog Box
- 1 comment
- Log in or register to post comments
Loop for Functions
Forums
Hello,
this is the first time i am writing in this forum, but i have already a lot of help from reading it. Now i m not getting any further.
It is best if i describe the problem first.
I want to split a database using the key extraction. Then i would like to create a pivot table, for example, in all the extracted databases. Since the database names can vary in number and naming due the keyfield extraction, a loop that runs through all files with the prefix of the extraction made sense to me.
- Read more about Loop for Functions
- 3 comments
- Log in or register to post comments
Automated email
Forums
All the rest of the code that loads the current IDEA base being analyzed and converts an IDEA database to excel works. As well as opening the page to send email. But this part of the code is not working, that part would be responsible for automatically forwarding the email.
'With OutlookMail, from that point "To" command, "CC", BCC, Subject, Body, Send dont work.
- Read more about Automated email
- 1 comment
- Log in or register to post comments
Splitting a string field into separate fields using a delimiter (e.g. comma, space, pipe, semicolon etc.)
Forums
Hello Everyone
I hope all is well.
May you please help if you have a solution around this? I know this was a covered on the below link, however, using the IDEA functions (@Left,@Right,@Split, @Simplsplit, @Mid, @JustNumbers) described, do not work for my currect situation. There are a lot of characters and segments, so trying to use IDEA functions is not effecient:
https://www.ideascripting.com/forum/text-columns-idea
Here is my current situation: