Skip to main content

How to use IDEA equations in scripts and custom functions

IDEA has over 100 functions that can be used in the equation editor.  The program has functions to manipulate character, numeric and time fields to name just a few.  You can also access all these functions in IDEAScript and Custom Functions by putting an i in front of the function.  So in the equation editor you use the @mid() function, if you wish to use it in a script or a custom function put an i in front of it like imid() to access it.

Brian Element Fri, 02/07/2020 - 10:43

In reply to by avikerem

Hi Avi, I just tried in 10.4 and it doesn't seem to work, neight does the iMatch but I am just wondering how you wanted to use it.  The problem might be it takes a field and see if that value is in the field, so might not translate properly over to VBA.

avikerem Fri, 02/07/2020 - 13:30

Hi Brian, it just seems more elegant to ask if ilist (parent, "father", "mother", "grandpa") instead of asking if parent = "father" or parent = "mother" or parent = "grandpa" and so on

Brian Element Fri, 02/07/2020 - 13:47

In reply to by avikerem

I agree, many languages allow you to do this with an array but unfortunately you can't do that with IDEA directly.  Is this something you do often?  I could create a function which would do this, basically you would create an array to hold the list and then the function searches the array for a hit.

KrisW Fri, 05/15/2020 - 15:17

I have located an IDEA v8 Tutorial & saved the appendix listing functions to a separate file, then converted to PNG. Not all functions are supported in later versions of IDEA, but this at least gives interested parties a starting point to document "i-functions". As I have time I will create a script to determine what is functioning in IDEA v11.1
NOTE: Some are valid VBA Functions, but it will be nice to find iFunctions for VBA Functions IDEA Script does not recognise