Re: FileMaker database access problem
Re: FileMaker database access problem
- Subject: Re: FileMaker database access problem
- From: demski <email@hidden>
- Date: Thu, 31 May 2012 17:27:53 +0200
Steve,
that's a great idea!
And thanks for the Translation btw ;-)
Am 31.05.2012 um 17:23 schrieb Steve Bennett:
> In addition to turning error capture on you might also add a status field to the FileMaker database that you can use to track the stage that your script is at. Towards the end of your process but before the delete record script step you would set the status field to something like "completed" and then check for that value before you try to delete the record. I find that setting a status value in FileMaker can be more useful that adding delays as both AppleScripts and FileMaker Scripts can check what stage the process is at.
>
> Steve
>
> On May 31, 2012, at 9:01 AM, demski wrote:
>
>> Invoking the AS thru an FM Script will help then.
>> There is a Scriptstep called (unfortunately in german...) "Fehleraufzeichnung setzen". It has the two Options on or off and when switched on it will suppress any FM Error Message.
>> With it you can catch the dialog in FM and react appropriately by a formular expression "get ( lastError )" or similar...
>> Another Scriptstep is ""Execute AppleScript" (or similar). With it you can either perform a static AS or a calculated one where variable information or fieldnames are calculated on runtime.
>> If I recall it right, there was an example in the FM Help when looking for "AppleScript"
>>
>> Hth,
>>
>> demski
>>
>> Am 31.05.2012 um 16:41 schrieb marion dickten:
>>
>>> Well, as I already said, the problem is that there is no error. Exception handling won't help. This is just a plain old dialog popped up by FileMaker. It interrupts all scripts, whether internal or external. They just sit waiting until the user responds by clicking ok.
>>> I think I'll try putting in some more and longer delays as Dana suggested and see what happens, but like Dana I'm not happy with this pseudo-solution.
>>>
>>> Marion
>>>
>>>
>>>> Hi, then maybe a simple try-Block might help?
>>>> In case of the Error of no permission just retry until you are allowed?
>>>> On FM Server you would have the same Dialog popping up in case of inaccessible Records...
>>>>
>>>> Another possibility might be to have a FM-Script running the AS-Routine.
>>>> There you could directly catch the Error and deal with it in an appropriate manner!
>>>>
>>>> hth,
>>>>
>>>> demski
>>>> Am 30.04.2012 um 11:04 schrieb Marion Dickten:
>>>>
>>>>> Hi,
>>>>>
>>>>>> On 30 May 2012, at 08:38, Marion Dickten wrote:
>>>>>>
>>>>>>> I am using AppleScripts to insert and delete records in a FileMaker database. Since this is a database other people access at the same time (remotely opened), we often run into access problems. Is there a way to create a database record that is locked for access except for the creating script? I have been thinking of transactions but what I've found by googling so far doesn't sound encouraging.
>>>>>>> (There are also some scripts created within FileMaker using FileMaker's own scripting language, and they give me the same problem.)
>>>>>>
>>>>>> Semi-random thoughts:
>>>>>>
>>>>>> - Are you using FileMaker Server to host the database? If not, this may help.
>>>>>>
>>>>>> - Are you creating the record via the script and then adding in data? Is this the problem? Have you tried creating the record with the data as a single action?
>>>>>>
>>>>>> - Can you not catch errors and retry?
>>>>>
>>>>> Well, as for using FileMaker Server, I would have to ask. I'm pretty much of a newbie about FileMaker and I simple use what I'm told to, I am only asked to do the AppleScripting.
>>>>>
>>>>> The problem is usually deleting a record, but sometimes it seems that inserting data is also a problem.
>>>>> Let me be as specific as I can. The database was created and is maintained by someone else. Most of the fields in the table are calculated by FileMaker scripts, sometimes rather intricate ones. The whole purpose of creating a new record is to insert one value into one special cell and have all the rest calculated. Then we pull the calculated values out via AppleScript and put them into another document. So the table is usually empty. We create a record, let FileMaker populate it, look at the results, and delete it again.
>>>>>
>>>>> The chief problem is that it is *not* an exception which interrupts the script, it is a regular dialog put up by FileMaker stating that we can't be allowed access because someone else is already accessing the data.
>>>>>
>>>>> Marion
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> AppleScript-Users mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>> Archives: http://lists.apple.com/archives/applescript-users
>>>
>>> This email sent to email@hidden
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> Archives: http://lists.apple.com/archives/applescript-users
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden