Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hello, I wrote an applescript program to gather the creation date of a specific file.

The result is to be returned to the same table the parameter came from.

Unfortunately the command line set cell "Infile::CreatedTime" to fileinfor

does not return the information into the field "CreatedTime"

I've also tried :

adding "of current record" 

- something like "set cellValue of cell "CreatedTime'" to fileinfor

 

Would someone have an idea why the information is not being returned to CreatedTime?

 

Many thanks!

Screen Shot 2019-10-15 at 12.01.14 PM.png

Posted (edited)

There are several syntax forms to set a field. I believe the simplest one to use here would be:

set cell "CreatedTime" of current record to fileinfor

Note that it's not necessary to use a fully-qualified name for a local field, although:

set cell "Infile::CreatedTime" of current record to fileinfor

should work just as well.

 

1 hour ago, DPaquin said:

Unfortunately the command line set cell "Infile::CreatedTime" to fileinfor

does not return the information into the field "CreatedTime"

I believe you are mistaken about that. It does modify the field - but without the of current record part it will act on the first record of the current found set.

 

Edited by comment
Posted

Thanks Comment,

Unfortunately the command execute and nothing get recorded onto CreatedTime.

As you can see the script is going through a loop (3 records). The example being showed is at the second record. CreatedTime for record one and two were not recorded.

The display dialog box command in the applescript function is being showed after the 

set cell "CreatedTime" of current record to fileinfor

has been executed.

Screen Shot 2019-10-15 at 2.25.41 PM.png

Screen Shot 2019-10-15 at 2.15.23 PM.png

Posted

Do you not get an error? From what I can see, you are trying to modify a new, uncommitted record. You should get an error message saying:

Data is being accessed by another user, script, or transaction.

Posted

Bizarre.

I am not getting any error messages. I've moved the perform applescript command after committing the record. Same behaviour no error messages.

Screen Shot 2019-10-15 at 2.51.26 PM.png

Posted

Once again,  I cannot reproduce the problem from your description. Can you post a simple file that shows this behavior (and if possible, nothing else)?

 

  • Like 1
Posted (edited)

Thanks Comment, 

I've re-executed the script with having the script debugger turned on. I had an error message appearing. It's now working.

Many many thanks! 

With regards!

Screen Shot 2019-10-15 at 3.28.27 PM.png

Edited by DPaquin

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