Jump to content

Changed Number field to Calculation and lost all data

Recommended Posts

I changed a field from a plain number field to a calculation field so I could automatically enter some data.  Disaster immediately struck upon hitting the OK button and all of my data was wiped out.  I have an excel file with the raw numbers in it, but when i try to import the data, it won't let me enter it into the new calculation field.  If I change it back to a number field, I can then reimport the data, but then can't change the field back to a calc field with losing the data all over again.  How do I get around this?

Here's some details:  I'm entering emissions data for engines.  When I start a new engine record, it automatically generates six child records, one for each emission type.  One of the six emission types (child records) is a calculated field derived from data in the engine's fields and the other five need to be entered manually:

If ( POL = 42401 and Engine Data::Fuel Type = "Diesel";

.09631*Engine Data::Max Fuel Usage Rate/Engine Data::Max Rated Bhp;

If ( POL = 42401 and Engine Data::Fuel Type = "LPG/Propane";

.46948*Engine Data::Max Fuel Usage Rate/Engine Data::Max Rated Bhp;


The calculation works correctly, filling in the one field like it's supposed to.  I just can't figure how to get my previously entered data back into their respective fields.

Thanks very much!

Link to post
Share on other sites
13 minutes ago, Guy_Smith said:

One of the six emission types (child records) is a calculated field derived from data in the engine's fields and the other five need to be entered manually:

You cannot have the same field be of one type for some records, and of another type for others. But you can define a Number field to auto-enter a calculated value - either initially only, or at any change in one of the referenced fields (in the same record only). Such value can be overwritten manually - unlike a calculation field that will always return the result of evaluating the formula.


  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Similar Content

    • By jayivan
      I have solutions that include a local file residing on a workstation that interacts with a hosted file. The local file does not need the hosted file for data entry; the connection is to download a job list and upload time entries. In FileMaker 16 and earlier, should the local file had been connected to the hosted file and there was a network interruption, the hosted file would reconnect or fail to do so, but the Local file would not be impacted. In FileMaker 17, if the connection cannot be re-established to the hosted file, the local file is now forced to close. That in and of itself would not be a big deal, but when the local file closes, NO DATA IS COMMITTED and DATA IS LOST. 
      Here's a scenario: a user downloads the job list and begins to do their timesheet when their network connection goes down. So, there's a series of lines entered in the portal when the network connection is down. In FM16 and earlier, the user could keep working or close the local file, and any work in progress would be saved with the local file. The time entered in the portal would be saved because the user would close the file, committing the data. In FM17, when the connection is lost and FM closed the Local file, it doesn't commit the data and data is lost.
      This change in behavior resulting in data loss seems like a bug. But if this behavior is intentional, I'll need to change the workflow to add commit steps after leaving portal rows, or adding onTimer commits scripts, or some other workaround to protect data and hopefully not interrupt user entry much.
      Any thoughts on this situation?
    • By TJ53
      Is there any difference in terms of performance between a calculation field (stored and indexed) and field defined as auto-enter calculated value (indexed)?
      For example, we have an “INVOICE” table, with a field called “date_invoice_sent”, and we’d like to have a boolean field called “is_sent”.
      The calculation would be “not IsEmpty(date_invoice_sent)”
      So we have two options here:
      - Calculation field (stored, number result).
      - Number field defined as “auto-enter / calculated value / do not replace … unchecked”.
      Would there be any difference in performance between the two options? thanks in advance!
    • By jdu98a
      When accessing a database via web direct from my iPad I am unable to type into any calculation field while in Find Mode. The field behaves as it does when in browse mode. Any letters typed into the field immediately disappear.
    • By AGilek
      Hi, everyone!
      In my database of weekly music charts (FMPro14) there are 4 linked tables:
      [Hits] - list of the hit singles
      [Entries] - list of different entries, remixes, reissues
      [Runs] - list of chart placings for every week
      [Dates] - list of dates of the weekly charts
      [Hits] contains:
      <idHits>     index field
      <Title>        text field
      [Entries] contains:
      <idEntries>    index field
      <Title>        text field
      <idHits_fk> number field, a foreign key which links [Hits] table with [Entries] table
      [Runs] contains fields as below:
      <idRuns>       index field
      <Place>         number field, position on the chart
      <LastWeek> number field, last week position 
      <idDates_fk> number field, a foreign key which links [Dates] table with [Runs] table
      <Title>           text field, title of a single
      <Name>        text field, name of the artists
      [Dates] contains:
      <idDates>    index field
      <Date>        date field
      Relations are as follows.
      [Hits] & [Entries] are linked by the relation:
      Hits.<idHits> = Entries.<idHits_fk>
      [Entries] & [Runs] are linked by the relation:
      Entries.<idHits> = Runs.<idEntries_fk>
      [Dates] & [Runs] are linked by the relation:
      Dates.<idDates> = Runs.<idDates_fk>
      Two years ago, on this forum, with a Consultant help, I have defined the self-join as:
      Runs::idEntries_fk = Runs 2::idEntries_fk
      Runs::idDates_fk ≥ Runs 2::idDates_fk
      where Runs 2 is a new occurrence of the Runs table. Then define a calculation field (result is Number) = Count ( Runs 2::idRuns )
      This will return the number of times the entry has appeared in the Runs table before (and including) the current week.
      So this allows counting chart weeks for every record in [Entries]. 
      Now, I’d like to also count TOTAL number of weeks, for [Hits], not [Entries], something like:
      Runs.<Place>; Runs.<LastWeek>; Entries.<Title>,  TotalWeeksCount for main record in [Hits]
      Example. Let’s say there is a hit single titled „Purple Rain”. Looking at its chart history we should get something like:
      Purple Rain - original entry - 10.10.1984 - 10 (0) 1 week
      Purple Rain - original entry - 17.10.1984 - 8 (10) 2 weeks

      Purple Rain - original entry - 14.12.1984 - 43 (33) 10 weeks
      — out of chart —
      Purple Rain - re-entry - 08.07.2008 - 56 (Null) 11 weeks *** 11 weeks, NOT 1st week of this new entry! ***
      Purple Rain - re-entry - 15.07.2008 - 48 (56) 12 weeks 
      How can I get such results? Help needed, thanks!
    • By cbombeck
      Hello Everyone 
      Very new to FileMaker here. 
      I have an Event Table with fields EventID, EventDate, and EventDuration, AND an Attendees Table with fields EventID, PersonID, and SignupCreatedTimeStamp. I would like to add a Field to the Attendees table that that will tell me how many hours of activities this person is already signed up for in the 30 days before/after that event. I can do this using the Find Records method, but I think this could be done in a Calculation Field using GetSummary. 
      The point of this all is to prevent people from signing up for more than 20 hours of activities in a month. After I get this calculation worked out, other checks will be put in place when creating new records to make sure people are in compliance. 
      To make this a little more flexible I added the following fields to the Events table 
      EventWindowStartDate = EventDate - 30 EventWindowEndDate = EventDate + 30 Guess what I'm not sure on is the syntax for GetSummary .... I've tried putting the following in a calculation field with no luck
      GetSummary(EventDuration, if(EventWindowStartDate...EventWindowEndDate, EventDuration, 0)) Am I going about this the right way? What is wrong with my calculation above? 
      Any thoughts or pointers would be much appreciated. Thank you very much in advance!! 
  • Who Viewed the Topic

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.