AnsweredAssumed Answered

PHP API and Global fields

Question asked by Tyler1 on Aug 10, 2009
Latest reply on Sep 16, 2009 by MartinBrändle

Title

PHP API and Global fields

Your post

In my Filemaker database, I have a global field that is set to the fiscal year. MANY calculated fields and field validation rules reference this field. I have setup a script that sets this global field upon file open. With the client and IWP, everything works great. My problem is with PHP.

 

I can retrieve accurate records easily with:

  $find->setPreCommandScript('SetFiscalYear');

 

My problem is creating a new record. There doesn't seem to be any way to execute a script before a record is created. The problem is that the fields are validated using a global field. Since this global field is inaccurate (and I can't set it), the validation fails. How can I set this global field BEFORE the record is created so the validation passes?

 

I've also wondered this for a while now... how can I get this global field to hold it's value as long as my session is open? (similar to how the client works)

 

I am using Filemaker Server 10 Advanced with the latest PHP API.

 

Thanks,

Tyler

Outcomes