How to use IDEA equations in scripts and custom functions
Forums
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.
How to use iReverse
I just tried this script and it works. If I enter abcde it will retrun edcba. I am at work right now using V8 of IDEA so I haven't tested this to see if it works on V9 but it should.
Sub Main
Dim sString As String
sString = InputBox("Please enter a string")
sString = iReverse(sString)
MsgBox sString
End Sub
Hi,
Hi,
This was useful to me, I'm using Idea v8.05 and I simply used the following synthax:
field.Equation = "@strip(column1)"
Needless to say that this makes my scripts very difficult to debug since the equation had to be on one line.
I'll now attempt to change the existing script I have to the "iFunction" synthax, which is a must before I can improve it.
Many thanks!
Marty
Hi Marty, and welcome to the
Hi Marty, and welcome to the site.
You wouldn't use the "iFunction syntax" in any formula that would use the equation editor. The "iFunctions" allow you to access most of the functions that are used in the equation editor directly in calculations that you peform within your scripts. One I use fairly often is the iReplace as the IDEAScript version of visual basic doesn't have an easy way to perform this function.
So let me know how your update works.
Brian
Hi Rob, my guess would be
Hi Rob, my guess would be that when they updated to version 9 they didn't update the functions for ideascript. SimpleSplit is a new function in V9 so that is probably why it doesn't work whereas Split exists in version 8. So I don't have a list but I think most functions will work except possibly the new ones that were added in V9.
iReverse
I tried this for the reverse function but it did not work. the Syntax I used is iReverse(Inputstring). Has anybody been successful with ireverse?