Field Missing means the Set Field step can't address the field you specified. That means:
1) It's not accessible from the current context
2) It's in a file FileMaker can't find (which is a variant of #1)
I would suggest that you double-check to make sure your context is correct. If you're firing this off as a server-side script, also check to make sure that there are no server-incompatible script steps. Finally, is this dependent on another file you have that the server-side script doesn't? Or perhaps that the account used for the server-side script doesn't have access to?
These are all possibilities. If none of them pans out, check back and maybe post a copy of the script so we can take a look.
I know that you said that there are no firewall restrictions in place, but is it possible that the FMS server itself has a port restriction in place - something that would prevent it from reaching your Web server?
Just a thought.
Insert From URL is limited in a lot of ways.
Without a plugin it's hard to overcome this.
and who might have such a plug-in, Christain?
Thanks for the replies.
It's not the server. We run the routine from a client machine that uses Calendar and some shell scripts to launch FileMaker and start our nightly routines. We tested the script on the client machine and it works.
It's not the context as there are SetField script steps before and after the InsertFromURL step and they're going to the same table. Plus it works in testing.
Maybe a plugin is the answer. Could someone suggest one?
CURL functions in MBS Plugin are one possible way...
Just because they're going to the same table doesn't mean they necessarily are accessible. Are they in a related table? Is the relationship between them valid?
A plugin isn't necessarily going to solve your problem here. It would only solve your problem if the results of the Insert From URL were invalid, or if it were timing out. I don't think that's what's happening, since the web server doesn't see a request.
If your Set Field script is failing on a Field Missing error, that means either (a) the name of the field is invalid, or (b) the field is inaccessible at runtime. Figure out what's wrong there first. Put in additional steps to capture the values of your parameters in a log table. Capture the name of the layout, the name of the field, the primary key of the current record, the primary key of the target record, timestamps, whatever it takes.
Something is different between the time you test and the time it runs in production. Dig a little harder and deeper. That would be my recommendation.
Which specific function? There's like a hundred. It's just a simple URL. There are no parameters. The last item in the path is the session number.
You're probably right. It's should be a field problem. Here's a snippet from the script. As you can see the 2 immediate steps before the InsertFromURL step are also writing to this table and they are working.I've already set a field with the error message and time stamp. I'll add more data to see what I can find.I have a few plugins I can try as well. We have BaseElements and Troi TURL.
Set Field isn't a great test, as Insert from URL requires the field itself to be on the layout, while Set Field does not. And the 102 error indicates the missing field is the problem.
Make sure "Select entire contents" is checked.
.5 sec might not be enough of a pause. You should probably check that the page has fully loaded.
Are you running this as a server side scheduled script? I have seen where it helps to put small delays in loops when doing things on the server like getting e-mail.
I have been setting up a log file that reports the error codes of all of the calls so I can see how this type of script does when being run on server. The records are put into a seperate table.
WE HAVE A WINNER!! A Trillion good karma points to David Jondreau!
We haven't used any of the "Insert" steps in so long (years & years) we forgot that they have to be on the layout.
We just use SetField for everything because it always works.
The layout I used for testing has all the fields so I can see what's happening. The one the script uses has a minimal set of fields, for speed and not the one being set by InsertFromURL.
I just tried the actual layout and got the 102 error. When I added the field being inserted to, it worked.
Lesson: When you test, test under actual conditions:
Glad you got it working.