Jump to content
Sign in to follow this  
jdu98a

Script Parameter Character Limit

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.  :)

Share this post


Link to post
Share on other sites

What is the maximum character limit for a script parameter in FM13?

 

Why do you need to know this?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By dmcs
      Hi. I had a really weird problem last night that was pervasive through all files I was working on, served, local, and even a new file I created to try to test the issue. It was totally crippling and driving me crazy. I had gone into a script and selected the Go to Layout command, but when I tried to select a layout, none appeared, even though there were plenty of layouts in the table. I dismissed it as a temporary glitch and tried a Set Field command, needing to set a field to a calculation, and again, found the system locked up in such a way as I had never seen before. It would not let me enter a calculation! I closed and re-opened the file. No dice. I restarted Filemaker. Nope. I rebooted my entire computer. Nope. I tried working on a local file. Still - no layouts could be chosen in ANY file! I tried making a *new* file. Nope! I was desperate, and just about posted asking for help when I thought to disable all plug-ins, just to make sure, and voila - that did it. As soon as I disabled the 360Works FTPeek and 360Works WebAssistant plugins, full functionality in the script workspace was restored! I thought maybe it was just a coincidence. I re-enabled the plug-ins and checked again. It still worked, with the plug-ins re-enabled, so - maybe I was just having a bad day, but then when I went back in this morning, again - with the plug-ins re-enabled, again - I couldn't select any layouts or make any calculations in Script Workspace, so right away I disabled the plug-ins, again, and again, that fixed it, so I'm pretty sure there's something going on with the plug-ins. I also had 360Works Email installed, but had disabled it the day before any of this started to test functionality on the server, so that one was never enabled, and that's probably the first time I've ever disabled that one while still having the other's enabled. Other than that, I haven't changed anything about my system for quite awhile. I'm actually running 16, so maybe this won't be a problem when we upgrade to 17, but for anyone else who hits this roadblock - disable your plug-ins.


    • By john renfrew
      This has long been an issue, I have no idea why it happens and it is making life quite difficult
      Win Server 2012 FMS 16 (current but this happens on other configurations)
      With ScriptMaster installed 
      run a script which resets the server ( SMReset) and then loads jars and functions return to you the result of SMGetRegisteredModules and show it in a dialog box
      run another script on the server which just returns to you the result of SMGetRegisteredModules and show it in a dialog box
       
      dialog 1 SHOWS the modules you installed
      dialog 2 is EMPTY
      fmsadmin restart fmse
      do the above again, same result
       
      this means you can not do a test on the server to see if a particular function is loaded before you want to use it.... in fact there is no test you can do to see if the ScriptMaster has fallen over as far as I can tell.
       
      Any solutions???
    • By JMart
      Hi gurus,
      I am sure I’m missing something simple, but for the life of me I can’t figure this out. I have a database with tickets. What I want is when a new ticket is created I want to see a popover (see attached) then I want the user to type in the top box and as they type I want to filter the list below (a portal) and once they client is shown they would select it and a ticker is created for the client. I sound a script and modified to fit my needs but can’t get it to work. Can someone stretch a helping hand?
      BTW the filtering is working but its not reflecting in the popover its reflecting on the layout.


    • By Hoytopher
      Hi all,
      I'm an FM novice who has a functioning database, and I'm trying to add layers of functionality to it. One feature I'm trying to design is a script to search through a Gmail outbox with certain keywords.
      In URLs, "%" translates to "%25". Filemaker appears to do this automatically - In Gmail syntax, you need to write "in%3Asent" to have the Gmail search bar contain "in:sent" which searches my outbox. Here's my current code for Go to URL:
      This "%" bit translates to "%25". I've tried "\%", I've tried creating a string, x, then having it open x, but no matter what I cannot get "%" to show up as-is, it always translates to "%25". Is there any way around this? I've tried subtracting text, but I just can't seem to get it to work. Any bright ideas? I can't find an answer to this specific question of disabling URL string substitution.
    • By Agentshevy
      Hello everyone..
      Guess I have been away for a while. Not fully back though because I am not really engaged with computer tech stuff at the moment. However, I really stumbled across a problem earlier today while going through my email logs. I observed that a server script I had set up has not been attaching the Pdf file report as supposed to. It only delivers the message while leaving out the file attachment. I did test the script when I added it but what I did not test was the result when run by the server.
       
      Allow user Abort [Off]
      Commit Records/Requests [No dialog]
      Set Variable [$FileName;Value:"Summary"&".pdf"]
      Set Variable [$PDFPath;Value:Get(TemporaryPath) &".pdf"]
      Go to Layout ["Summary_Layout]
      Perform Script ["Print_Page_Setup"]
      Save Records as PDF [Restore;No dialog;"$PDFPath";Current record]
      Send Mail [Send via SMTP Server;No dialog]
       
      As at the time of my writing the script, I was not observant about server-side scripts. I did go back just recently to observe that the "Save Records as PDF" script step is not server compatible.
      Please, is there any work around on this? Much help is appreciated.
  • Who Viewed the Topic

    3 members have viewed this topic:
    comment  Milerfake  johosler 
×
×
  • Create New...

Important Information

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