Solved

Keep track of history of 2 fields within a record.

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

18 Experts available now in Live!

Get 1:1 Help Now