• Content count

  • Joined

  • Last visited

  • Days Won


Chuck last won the day on August 8 2011

Chuck had the most liked content!

Community Reputation

2 Neutral

About Chuck

  • Rank
  • Birthday 06/16/1971

Profile Information

  • Gender
  • Location
    Hemet, CA
  • Interests
    Software development, history, classical literature, chess, scouting

Contact Methods

  • Website URL
  • Skype
  • AIM
  • Yahoo

FIleMaker Profile

  • FM Application
    14 Advanced
  • Platform
    Cross Platform
  • Skill Level
  • Certification
  • Membership
  1. In a system I built years ago, I register a ScriptMaster function with the following (obviously based on one of the ScriptMaster examples): RegisterGroovy( "PostDataToURL( key1 ; value1 ; key2 ; value2 ; key3 ; value3 ; key4 ; value4 ; url )"; "// Construct data¶ String data = URLEncoder.encode( key1, \"UTF-8\") + \"=\" + URLEncoder.encode(value1, \"UTF-8\" );¶ data += \"&\" + URLEncoder.encode( key2, \"UTF-8\") + \"=\" + URLEncoder.encode(value2, \"UTF-8\" );¶ data += \"&\" + URLEncoder.encode( key3, \"UTF-8\") + \"=\" + URLEncoder.encode(value3, \"UTF-8\" );¶ data += \"&\" + URLEncoder.encode( key4, \"UTF-8\") + \"=\" + URLEncoder.encode(value4, \"UTF-8\" );¶ ¶ // Send data¶ URL url_obj = new URL( url );¶ URLConnection conn = url_obj.openConnection();¶ conn.setDoOutput( true );¶ OutputStreamWriter wr = new OutputStreamWriter( conn.getOutputStream() );¶ wr.write( data );¶ wr.flush();¶ ¶ // Get the response¶ String response = conn.getInputStream().getText( \"utf-8\" );¶ wr.close();¶ return response;"; "isGui=false" ) The function is called with the following script step: Set Field [ POR__Main::xml_response ; Let( [ _ob = "AAA00000000"; _url = ""; _key1 = "Contents"; _data1 = POR__Main::xml; _key2 = "OB10Number"; _data2 = _ob; _key3 = "Username"; _data3 = _ob; _key4 = "Password"; _data4 = "abc" ]; PostDataToURL( _key1; _data1; _key2; _data2; _key3; _data3; _key4; _data4; _url ) ) Starting yesterday, the script that executes the above step began giving an error. `SMLastError` returns `" Connection reset"` while `SMLastStackTrace` returns the following: Connection reset at at at at at at at at at$ Source) at at com.prosc.beanshell.GroovyFunction.invoke( at com.prosc.fmkit.Plugin.invokeFunction( at com.prosc.fmkit.RegisterablePlugin.invokeFunction( at com.prosc.fmkit.Plugin.invokeFunctionNoErrors( at com.prosc.fmkit.PluginBridge$ at com.prosc.fmkit.PluginBridge.runTask( at com.prosc.fmkit.PluginBridge.doFunction( All of my checking indicates nothing has changed in the function or the script. We are waiting to hear back from the vendor we're connecting to in order to see if there's anything that changed on their end, but that seems unlikely. Why would this be happening and what can I do to resolve it? Thanks, Chuck
  2. I'm looking for information about a FileMaker plugin called "PyPlugin." I have a client with an existing system who has it installed on macOS, but I can't find any information or documentation about it. Given the name, I assume it allows the execution of Python within FileMaker, but this isn't PyFM or PyFileMaker, since first, it's working on a Mac, and second, it's a plugin, not a Python library. The system has been used for quite some time, so perhaps the plugin isn't available any more, but if anyone can point to any documentation for it, or, of course preferably, a link to be able to download it, I would appreciate it. Thanks, Chuck
  3. I have found the 24U plugin template to be quite useful in porting a plugin that was originally built for Windows, but one issue I've come across is that the function IDs need to match the existing Windows version instead of working sequentially. In an attempt to make this happen, I added a `#define` for each of the plugin functions in FMTConfig.h, such as: #define FUNCTION_1_ID 15007 Then I changed the lines in FMTemplate.cpp to read like this: err = RegisterExternalFunction( FUNCTION_1_ID, FUNCTION_1_PARAMS, regFunction1Flags, FUNCTION_1_C_NAME ); ... UnRegisterExternalFunction( FUNCTION_1_ID ); .... (void) fmx::ExprEnv::UnRegisterExternalFunction(*pluginID, FUNCTION_26_ID ); One function, the second one, retains the default ID, so it reads #define FUNCTION_2_ID 2 Anyone familiar with the template has probably already guessed what has happened. That second function is the only one that is useable in FileMaker. The rest of the functions have blank lines in the function list of the calculation dialog box. I think this is related to the myplc.c and files, but can't quite figure out what needs to be changed. I *think* I might need to edit FMTemplate.plc, but that doesn't seem right, since it hasn't been edited to this point and only includes the strings generation code for the first 10 functions (there are 26 functions at this point). Just to try it out, I attempted to directly edit the strings file after the plugin was built, but this didn't help, or more properly, I wasn't sure what edits to make. So, if I *need* to have my first function have a function ID of 15007 instead of 1, what else do I need to change? Thanks, Chuck
  4. The linked article seems to apply only to FileMaker and Outlook on Windows. This is all on OS X.
  5. I have the following script: Set Variable [ $_file_path ; Value: "file:" & Get ( TemporaryPath ) & GetAsText ( AdArtwork::AdArtImage ) ] Export Field Contents [ AdArtwork::AdArtImage ; “$_file_path” ] Send Mail [ Send via E-mail Client ; With dialog: On ; To: InsertionOrders::Email ; Subject: InsertionOrders::Company & " Ad Proof - " & Projects::ProjectName ; “$_file_path” ] This works perfectly on OS X 10.11.4, FileMaker 14.0.4 with 9.3 as the default mail program. It also works for at least one user who has Outlook as their default mail program. Another user, however is complaining that, while the Outlook icon bounces in the dock, no new email is created. In an attempt to duplicate the problem I installed Outlook and made it my default mail program. The behavior I see is slightly different, but similar. I don't get the bouncing dock icon, but rather Outlook is brought to the foreground, although like the reporting user, I do not get a new email created. I'm using Outlook 15.21.1. Any ideas on what the problem might be? FileMaker's help page on `Send Mail` specifically mentions that Outlook is supported on OS X. Thanks, Chuck
  6. Wim, Thanks for the FTS suggestion. I already owned it, and I'll read that chapter. Chuck
  7. A further clue: We got it to not crash by removing every field from the quick find except the one field that users are actually interested in search. So perhaps there's a corrupted index on one of the other fields? but that wouldn't explain why it works when it's moved to a different machine.
  8. I have a client who was hosting a database using a older Mac Pro running Mavericks and FMS 12. About a week ago they were finding that a series of steps would crash the server. If they used the quick find feature twice, the server would stop serving the files. All three served files would be closed and the server would be turned off. We could get things back up and running by turning the database server back on in the admin console, but we did find that we couldn't initiate a manual schedule execution. We could select a schedule and we could choose to run it, but doing so would have no effect. They have a sandbox server, a Mac mini. Moving the files to that server didn't show the problem. That server was running Yosemite and FMS 12. So we figured it might be hardware or corrupted OS files or corrupted FMS program files. First we ran Disk Utility, which reported the drive was fine, but I didn't believe it, so we ran TechTool Pro, but that reported no problems with the Mac Pro at all. We wiped the drive and did a clean install of El Cap and FMS 14, uploaded the files and got the same result. The Mac Pro crashes, the Mac mini doesn't. Here are the server specs: Mac mini OS X 10.9.5 FileMaker Server Mac-mini (Mid 2011) 2.7GHz Intel i7 256GB SATA SSD 8GB 1333 DDR3 memory ATI Radeon HD6630M 256MB Mac Pro OS X 10.11.4 FileMaker Sever Mac Pro Server (Mid 2012) 2 x 2.4GHz 6-Core Intel Xeon 2.61TB RAID Array (Mac Pro RAID card, slot 4, RAID Level 5, 4 x 1TB WD1001FALS HDDs) 12GB 1333 DDR3 ECC memory (2GBx6) ATI Radeon HD5770 1024MB So I'm at a loss. Could TechTool be wrong and this is a hardware problem? Any other ideas? Thanks, Chuck
  9. I'm trying to build a script that will find certain records and FileMaker is crashing as soon as it tries to execute the script, i.e., before it even gets to the first script step. First of all, Jobs is a shadow table that exists in an MSSQL database that's being accessed using Actual Tech's ODBC plugin. CachedJobs is a local FileMaker table. There's a relationship from Jobs to CachedJobs using an unstirred calculated `hash` field in Jobs matched to an indexed `original_hash` field in CachedJobs. I want to find Jobs records that have no related CachedJobs records (indicating either that the job is new or that it's changed and needs to be updated). Here's the script: Go to Layout [ “JOB” (JOB) ] Enter Find Mode [] Set Field [ Jobs_CachedJobs::uuid ; "=" ] Perform Find [] Executing the above gives me the spinning beachball and I have for force FileMaker to quit. This happens even when the debugger is open. The spinning beachball happens before it even gets to the first script step. Note that I can perform this search manually without trouble (at the moment it returns all the Jobs records because they all need updating). If I change line three above to search for something in Jobs directly, such as Jobs::UniqueID, that works (in this case showing no records, or if I change the "=" to "*", it finds all records). But running the script crashes FileMaker every time. Is this a known bug of some sort with either FileMaker or Actual Tech's driver? Searching through a relationship from a shadow table to a local table in a script won't work? Am I doing something incorrectly, or should I just not expect this to work and I should find a different algorithm to solve the problem? Thanks, Chuck
  10. I'm working with a solution that accesses MSSQL tables using ESS. Some of the scripted searching that's in place needs to search across multiple tables and relationships. For example, when the user logs in, the database is supposed to show them a list of jobs that have uncompleted tasks, with jobs and tasks each residing in their own table in a one-to-many relationship. The solution works, but it's slow, even over the local network, and that's only going to get worse over time as the number of jobs and tasks increases. So I'm looking at creating a cache table that stores the data that we need to search on in indexed fields. But before I begin designing this, I'm pretty sure this is a problem that's been solved before, and thought I would check out there for any tips or articles that might exist that Google has failed to find for me. Just a few FYIs: - I cannot edit the schema of the MSSQL system - The existing MSSQL system does *not* have fields that record when a record was last modified - I've created hash functions to allow me to determine if a record has changed (i.e., store the hash of the record in the cache table, compare the cache hash to the original record's hash, if they differ, the data needs to be updated) Thanks Chuck
  11. Has anyone come up with a way to nicely add a couple of static options to a value list generated from a field? For example, assuming I have a field that I'm using to create a value list. I want the exact same value list, but with "All", "Mine", and a separator to appear at the top. I figured out a way to create a value list that includes "All" and "Mine" in addition to the names in the field the values are drawn from, but the words appear in their alphabetical order, not at the top. My fallback solution is to have radio buttons for "All", "Mine" and "Values" with the value list only showing up if the user selects the "Values" radio button, but this wouldn't be as elegant as what I'm trying to do. Thanks, Chuck
  12. That was it. PSoS uses the calling script's logged in user, and that logged in user didn't have fmpapp privileges, which is, apparently, what server scripts need. I was actually a little surprised that there's no extended privilege dedicated to that. Thanks for the assistance.
  13. Wim, From FMP, everything works fine. I did, early in the development of this feature, test that the plugin was installed by simply calling a PSoS that returned the ScriptMaster version to the script result, so I know that the plugin is installed and enabled. But I tried the same sort of test from WebDirect and got a permissions error. I created two scripts and gave them both full access privileges. "Return plugin version" which looks like this: Exit Script [ Result: SMVersion ] "Test Plugin" looks like this: Show Custom Dialog [ "test plugin" ] Perform Script on Server [ Wait for completion ; "Return plugin version" ] Show Custom Dialgo [ Get ( ScriptResult ) ] I placed a button on the WebDirect layout and linked it to "Test Plugin". Clicking it results in a "Your access privileges do not allow you to perform this action." message. I don't even get the first dialog box. But the script is set to execute with full access privileges, so what am I missing? WebDirect is set up for guest access only. The file is set to log in using the guest account and the only extended privilege the guest privilege set has turned on is fmwebdirect. So when users connect via FileMaker Pro they get the credentials dialog box. At least I think I'm on the right track to figuring this out with this new bit of information. Thanks, Chuck
  14. I'm publishing a small portion of a larger system via WebDirect. It's a form that visitors fill in, the submit button of which executes a script that creates a few records based on the form contents and sends an email to the visitor. We started with the email being plain text using FileMaker's built-in Send Mail script step. The client asked for the additional feature that the emails be HTML instead. So, while retaining the plain text version sent to actual visitors, I added the ability for HTML email to be sent to some testing email addresses. Actual visitors don't yet see the HTML email. Everything works perfectly in FileMaker Pro. If I go to the layout, fill in the form, and click the button, the visitor email address gets the plain text version and the testing email address gets the HTML version. From WebDirect, however, the testing email address gets nothing (although the visitor email address still gets the text only version, as expected). And I don't understand why. The script that does this is meant to be executed on the server, and it takes care of that direction itself. It looks something like this: If [ ShouldPerformOnServer // This script should execute on the server ] Perform Script on Server [ Wait for completion ; "Send Email" ; Parameter: Get ( ScriptParameter ) ] Set Variable [ $_result ; Get ( ScriptResult ) ] If [ Get ( LastError ) = HostExceedsCapacity ] Set Variable [ $? ; TurnOverrideOn // Overrides that this script should execute on the server ] Perform Script [ "Send Email" ; Parameter: Get ( ScriptParameter ) ] Set Variable [ $_result ; Get ( ScriptResult ) ] Set Variable [ $? ; TurnOverrideOff ] End If Exit Script [ Result: $_result ] Else // Send the email using ScriptMaster Exit Script [ Result: SMLastError ] End If As far as I can tell, by placing Show Custom Dialogs throughout the script, this is executing on the server, but the HTML email that's supposed to be sent with ScriptMaster isn't actually sent. The only difference when it doesn't work is that the Perform Script on Server is being executed from WebDirect, for the plugin doesn't seem to work, even though the actual plugin execution only takes place on the server (the HostExceedsCapacity isn't generated). Should I just look into other ways to send HTML email from a script executing in WebDirect, or am I missing something obvious here? Thanks, Chuck
  15. I have a single layout that is being published in WebDirect. It's a very simple layout with a slide panel with two panels and half-a dozen global fields a background image, a log and a button. The background image is on the layout instead of the layout part. The button runs a script that just takes the filled in data, pushes it to various created records and presents a thank you page (the second panel). I've had a few problems in Safari, but the client is reporting many problems in all browsers. I've been able to reproduce at least one in Chrome (47) which sounds like what they're seeing. Most of the time it works fine, although the client reports more frequent troubles than I've been able to duplicate. I'll be filling in the fields and suddenly the page goes blank and shows me the spinning "loading" indicator. And then nothing. I can reload the page, but unless I do that the indicator just spins forever. It might The layout has one script trigger, OnLayoutEnter, that hides and locks the menubar and toolbars, but that's it. No other script triggers on fields or other widgets. What could be causing this? Basically, I'm nearing the point where I'm about to give up on WebDirect and just build this with the PHP API instead, but if I can get it working reliably, I'd certainly like to avoid rewriting it. This is all being served with FileMaker Server 14 form rented hosting on FMP Hosts.