Solved

Keep track of history of 2 fields within a record.

Posted on 2013-11-06
3
435 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 24

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 24

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now