Jump to content
Server Maintenance This Week. ×

writing to fmp table from applescript


DPaquin

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

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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