Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

FM - Setting Timestamp Field Based on Another Field set via a Script

Posted on 2011-03-17
10
Medium Priority
?
805 Views
Last Modified: 2012-06-27
This is really hard to test as I have a lot of scripts run off of my Status field.  Already searched EE and FM Help.  I want a timestamp field to be filled with the current date/time anytime there is a modification in my Status field.  This seems easy - just put a script trigger on OnOjbectSave.  However, what if the field is set in a script.  I think this bypasses the trigger.  I have so many scripts that alter this field (Retain, Retire, or Refer status) that it would be nice if I could just set the timestamp field to alter anytime this status field alters.  I thought of doing this via the field's properties AutoEntry, but my understanding is that these fields only run on record creation and not any time in the future when the field might be modified.  Suggestions?
0
Comment
Question by:rvfowler2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
10 Comments
 
LVL 25

Accepted Solution

by:
Will Loving earned 2000 total points
ID: 35159486
Use the following auto-enter calculation with the "Do not update..." checkbox unchecked.

Let (
trigger = Status ;
Get (CurrentTimeStamp)
)
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 35159509
Also, you might want to consider an audit trail for Status, which tracks what field was changed and when. Check out this video tutorial from John Mark Osborne on Object Script Triggers. The whole video is a good introduction to an explanation of the differences between the various triggers, but at just before the 10 minute mark he shows how to create an audit trail.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 35159512
Sorry, I meant the "Do not replace existing value of field (if any)" checkbox.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Expert Comment

by:challengeday
ID: 35159523
Sounds like a cool video, I don't see the url though. Thanks!
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 35159963
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 35161032
Thanks, I'll look into the video.  Easier than I thought.  But I created 3 timestamp fields so we can have a record if somone moves from retain to refer and then to retire.  So, can you do the calc like this?

If (Status = "Retain";
Let (
RetainStamp = Status ;
Get (CurrentTimeStamp)
)
)
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 35161081
Yes, doing it conditionally works (at least on my test)
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 35162303
Yes, it worked, thanks, but I'm having a hard time understanding it in English.  Let sets a variable and then uses it in a calc after the semicolon.  However, here, it seems that the entirety of the calc is simply Get (CurrentTimeStamp), so the variable, or in this case the field, is equal to the timestamp since it is equal to whatever comes after the semicolon.  Did I say it or explain it correctly?
0
 
LVL 25

Assisted Solution

by:Will Loving
Will Loving earned 2000 total points
ID: 35162453
I got the calc elsewhere myself, so I don't have a technical explanation but I think that in either case, what is happening is that setting the Let variable to equal the Status field causes the calc to evaluate whenever Status changes. It's some aspect of how/when a Let variable evaluates in a calculation which is different from just doing an If statement.
0
 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 35165321
Thanks.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question