Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4796 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

  • 8 months later...
Posted

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.

  • 2 weeks later...
  • 2 months later...
Posted

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?

  • 2 weeks later...
Posted

See related thread: http://fmforums.com/forum/topic/80863-fmproexecutesqlarray-problems-with-result-count-and-field-names/

No solution there.

Posted

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.

Posted

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.

  • 4 weeks later...

This topic is 4796 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.