Solved

Keep track of history of 2 fields within a record.

Posted on 2013-11-06
3
437 Views
Last Modified: 2013-11-06
Good morning,

  I assume someone more experienced with FMPro will be able to solve this pretty quickly.

  I am using FMPro 8.5 Advanced.

  I have a database that is keeping track of parts that get ground down over time to make them smooth.  

  One of the requests, and the last piece I need to finish, is a "History Field".  This field will keep track of the date of each grind and the diameter of the object at that point.

Basically I want to make a list that will be in one large, scrollable field, that will have both the date timestamp and my diameter field in it.  

  This seems like it should be simple and I am just making it over complicated.  

Any help is greatly appreciated.
0
Comment
Question by:bobrossi56
  • 2
3 Comments
 
LVL 25

Expert Comment

by:Will Loving
ID: 39628183
Are you looking to have the history field populated as a result of another action such as creating another record or do you just want to have  button that adds a line to the history field using today's date and pulling the diameter value from another field?
0
 

Author Comment

by:bobrossi56
ID: 39628271
I have a save button everytime someone adds to the record, so I assume that could be used to populate the field with the current information.
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 500 total points
ID: 39628452
Then all you need to do is add a Set Field() step to your Save script. The script step would look like this:

Set Field [ MyTable::History ; MyTable::History & "¶" & Get ( CurrentDate ) & " - " & MyTable::Diameter ]

What's happening in the calculation is that you are saying "set the contents of the History filed to the existing contents of the field PLUS add a carriage return followed by the current date and the Diameter field value, e.g. "11/6/2013 - 63.25 mm"  Though you can format the line however your want instead of using space-hyphen-space as I have.

One other note is that while I used a literal carriage return above, a nicer way to do this (and which is useful in other circumstances) is the use the List() function. Then the calculation would look like this:

List( MyTable::History ; Get ( CurrentDate ) & " - " & MyTable::Diameter )

The List() function creates a carriage return separated list and has the added advantage over the explicit return method that if one of the values is empty it's skipped and there is no extra carriage return.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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