AnsweredAssumed Answered

Logging script woes.

Question asked by robcam on Jan 8, 2013
Latest reply on Jan 15, 2013 by jbante

I am a new user of Filemaker, now using FMP advanced 12.

I would like to emphasize BEGINNER.

I need to create an audit log of access to a layout/table.

I have enabled a script trigger on accessing the layout (On Layout Enter)

The script is as follows

 

Set variable [$variable1; Value: Get (AccountName)]

Set variable [$variable2; Value: Get (CurrentTimeStamp)]

Freeze Window

New Window [Style: Document]

Go to layout [“log” (log)]

New Record/Request

Set Field [encounterlog::AccountName; $variable1]

Set Field [encounterlog::TimeStamp; $variable2]

Commit Records/Requests [Skip data entry validation; No dialog]

Close Window [Current Window]

 

This, of course, creates an infinite loop as each time the window closes it actives the OnLayout script trigger.

How can I perform this script on accessing the layout without generating the loop.

Any suggestions would be greatly appreciated.

A newb.

Outcomes