October 4, 201015 yr Hi, I'm getting an index out of bounds exception from the fmpro object when executing a query. It seems a particular record is causing the problem, because it doesn't happen when I change the parameter in the WHERE clause. The exception originates from FMPro.java:179 java.lang.ArrayIndexOutOfBoundsException: 3 Parameters: {sql=SELECT "Record No", "Category", "Message details", "Date" FROM "Job Tracking 2" WHERE "Job Number" = '0000511'} ---Script--- Script: String[][] data = fmpro.executeSqlArray( sql ); return ""; Thanks, Ryan
June 30, 201114 yr I just experienced this issue as well, and think I have discovered the problem and uncovered another related issue with executeSqlArray()... This is the simplest code that demonstrates the issue, it should be run from the ScriptMaster.fp7 file. fmpro.executeSqlArray( 'SELECT "Is GUI function", title FROM Demo' ) By default, it should work (or look like it worked, at first glance). If you look closer at the result, you will notice that when "Is GUI function" field is empty, it's value (null) is after the title. This is the other related issue I was talking about. Next, go to the first function in the list of found functions (it should be "Basics Example of Variables and Results", it was for me), then un-check the GUI function field, then go back and run the code above again. This time you will get the ArrayIndexOutOfBoundsException. I think the issue comes from not testing for a null value (or FileMaker returning a null value in a manner that cannot be tested for). Either way, this one has to be fixed by 360Works since it is in the ScriptMaster plug-in itself.
October 10, 201114 yr Have you tried updating to the newest version of ScriptMaster? I know there have been some changes since this thread was started.
October 12, 201114 yr It's been a while, but I believe my post on June 29 was done in the current version (4.124). Have you tried to re-produce this, as outlined in that same post?
October 25, 201114 yr See related thread: http://fmforums.com/forum/topic/80863-fmproexecutesqlarray-problems-with-result-count-and-field-names/ No solution there.
November 1, 201114 yr Can you send a sample file with the issue? We are going to try to get this issue resolved soon. Brent Basham [email protected]
November 3, 201114 yr See my first post in this thread for how to re-produce this issue in the ScriptMaster sample file.
November 4, 201114 yr Thanks Dan. I have not had time to create my test file. I also want to know why it acts differently in different contexts http://fmforums.com/...nd-field-names/ Right now I am having to pepper my code with if statements that count result sets, its a real pain.
November 7, 201114 yr I wanted to let everyone know we are aware of this issue and are looking into it. I also want to apologize for the delay in handling this. My email is [email protected] and I will be working on a solution. When resolution is reached I will post here for everyone to review. Again, I am sorry for the delay.
November 11, 201114 yr We've resolved this issue internally. This will be fixed in our next release of scriptmaster. I'll try to get a beta build for you guys if I can so that you can try it out before we release it.
November 12, 201114 yr Thanks David - can you confirm that you will update to the latest Groovy too at the same time?? http://fmforums.com/forum/topic/79058-update-to-groovy-18/
December 14, 201114 yr Bump Any chance of a Groovy update? Been asking since the summer now... Thanks
Create an account or sign in to comment