October 15, 20196 yr 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!
October 15, 20196 yr 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, 20196 yr by comment
October 15, 20196 yr Author 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.
October 15, 20196 yr 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.
October 15, 20196 yr Author Bizarre. I am not getting any error messages. I've moved the perform applescript command after committing the record. Same behaviour no error messages.
October 15, 20196 yr 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)?
October 15, 20196 yr Author 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, 20196 yr by DPaquin
Create an account or sign in to comment