DPaquin Posted October 15, 2019 Posted October 15, 2019 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!
comment Posted October 15, 2019 Posted October 15, 2019 (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 October 15, 2019 by comment
DPaquin Posted October 15, 2019 Author Posted October 15, 2019 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.
comment Posted October 15, 2019 Posted October 15, 2019 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.
DPaquin Posted October 15, 2019 Author Posted October 15, 2019 Bizarre. I am not getting any error messages. I've moved the perform applescript command after committing the record. Same behaviour no error messages.
comment Posted October 15, 2019 Posted October 15, 2019 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)? 1
DPaquin Posted October 15, 2019 Author Posted October 15, 2019 (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! Edited October 15, 2019 by DPaquin
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now