Solved

Keep track of history of 2 fields within a record.

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
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…

752 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