Skip to main content

IDEASnippets

Replace function

This function allows you to replace part of a string with another part.  So if you have a string "ACBDEFGH" and you want to replace "DEF" with "MNO" using this function it would return "ABCMNOGH"

Get the field name

This function will get a field name of a field given its location within the database.  If the location is -1 it will default to the last field name.

I have updated the script, it now uses 0 to find the last entry and negative numbers to find the field name starting from the right.

Get File Name

A function to obtain the file name from a string that also contains the directory info.  This was updated on April 4, 2012 to add functionality for files that may be in sub directories.  Also added functionilty where you can get the file name or the file name with the directory imbedded in the IDEA working directory.

Field Dialog

This code creates a menu that allows you to pick multiple fields.  The code should be inserted as part of the menu structure and as part of the menu, usually based on a select statement option of a button being selected from the main menu.