Solved

Keep track of history of 2 fields within a record.

Posted on 2013-11-06
3
445 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
[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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

617 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