Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

This should be easy for someone to answer. I have looked around on my own but haven't come across an answer. What is the maximum character limit for a script parameter in FM13? And, this may be a silly follow up question but I want to make sure, is that limit the same for scripts being run on FM Server 13? Thanks in advance.

Posted

Script parameters invoke the calculation engine so i think this rule would apply:

 

Size of calculation formula: Maximum of 30,000 characters, including text and numbers, any referenced fields, operators, functions and parentheses.

 

http://help.filemaker.com/app/answers/detail/a_id/11889/kw/text%20limit/session/L3RpbWUvMTQyMDgwOTUzMS9zaWQvbk9VZm0qYm0%3D

 

Without actually knowing i would guess that "any referenced fields" means the content of any referenced fields not the references themselves

Posted

Size of calculation formula: Maximum of 30,000 characters, including text and numbers, any referenced fields, operators, functions and parentheses.

 

That's the limit for the size of the calculation formula - not for the result. And, to my understanding, the content of the referenced fields is irrelevant when constructing the formula - otherwise a field that contains more than 30,000 characters could not be used in a calculation at all.

 

The tech specs do not specify any limit for the content of a script parameter (or a variable). One could surmise that the size is limited only by available memory - but that's just a guess. 

Posted

That's the limit for the size of the calculation formula - not for the result. And, to my understanding, the content of the referenced fields is irrelevant when constructing the formula - otherwise a field that contains more than 30,000 characters could not be used in a calculation at all.

 

The tech specs do not specify any limit for the content of a script parameter (or a variable). One could surmise that the size is limited only by available memory - but that's just a guess. 

This calls out for someone with a lot of time on their hands to do some testing.  :)

Posted

The maximum is 999,999 characters. 

 

Calls to scripts with 1,000,000+ characters will fail without throwing an error.

 

I discovered this when developing EasySync. (It passes payloads to the server using script params.)

 

-- Tim

Posted

I'm needing to figure this one out because I've run into a similar issue to the one Tim describes. Scripts failing without error. This seems to coincide with extraordinarily long script parameters.

 

Also, Tim, it's very ironic that you would come across my particular post on this. The job I'm working on, believe it or not, is breaking out pieces of your FMEasyAudit to improve my own audit log that i'm making for my company's product database. There are potentially 100K+ record audits that will be logged daily and your use of SQL calls is working really well. Great job on that. I have my audit log set up as a separate database file on the server, but I've been able to use your basic approach to increase performance by orders of magnitude.

 

Which brings me to my specific problem. Passing extremely long lists of modified fields to the audit log database to be parsed. The SQL statement that loops through finding any and all modified records produces monumental text strings when I've just finished importing 50,000 records with 30+ fields each. These text strings are then saved as a $Variable and that variable is sent to the audit log database on the server as a script parameter. The way i've been getting around the failures so far is by simply pushing logs for a predetermined number of records at a time. Rather than all 50,000 at once I'll send them 100 at time, or something like that. 

 

If I could find out the exact maximum limits of a script parameter I could set that (or something near it) as the rate at which I pass logs. This would maximize the speed of the operation.

Posted

The max that I was seeing was hit when passing params via Perform Script on Server. I had assumed that it was the same when passing them with the standard Perform Script, but apparently not...

Jdu98a, you might want to take a look at this blog post, which very briefly describes a technique that we are calling "Fireball." http://www.timdietrich.me/blog/fireball-intro/Depending on how you are implementing your audit trail, you might be able use this technique (or something similar) to handle passing large numbers of records, or large payloads in general. It would need to be hosted with FMS for this technique to work, as it uses CWP XML.

Tim

Posted

The max that I was seeing was hit when passing params via Perform Script on Server.

 

Ah. For this, you need to turn to the help on the script step, which states black on white LED that:

 

Scripts performed by Perform Script On Server:

  • ...
  • ...
  • support script parameters and script results up to 1 million characters.

This topic is 3608 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.