Jump to content
Server Maintenance This Week. ×

Storing Un-stored calculation in a portal to the parent table


This topic is 3280 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm new to FM.  I working with FM PRo 12.  I have a table called "Performance" that holds data from farmers activities.  There are fields for task, actual time, Efficiency percentage, Reference Efficiency,  Time Efficiency, and a Summary field for Time (used in the calculation of Efficiency percentage and Time Efficiency.  Every activity has a portal for "Performance".  The calculation are correct in the portal but not in the parent table.  How do I correct this situation?

Link to comment
Share on other sites

Every activity has a portal for "Performance". 

What relationship is that – a self-join? Earlier, you said …

I have a table called "Performance" that holds data from farmers activities. There are fields for task …

where “a table” to me reads “one table”.

So, what are the calculations you refer to, and how is the portal relationship defined? (Also, is a “Task” an “Activity”?)​

Edited by eos
Link to comment
Share on other sites

  • Newbies

Background info - We created this database to calculate the efficiency of each farmer for each task done on the farm.  Each general task - prepping, maintenance, harvest, and packing - has a table that has fields for detailed info regarding that general task.  The specific tasks regarding who did the task, how long it took, and their efficiencies were placed in the Performance Table so that all the performance data would be on one table.  There is also a Reference Table that has the TaskID for each specific task - there are about 30 tasks - and the baseline duration for each task.  And a People Table to store info regarding the farmers.   Hope that helps.

So you are correct, one table is Performance.  An example of the other activity, or task, tables is "Prepping".  This table has fields for details regarding the "Prepping" activity or task done.  There is a corresponding Layout called "Prepping" for data entry.   A portal from the Performance Table in the Prepping Layout helps me easily input data (I think...).  The data input occurs in one TOG.  In this TOG, the data shows correctly in the Prepping Layout.  But when I view the data in the Performance Layout in this TOG the data is incorrect.  My assumption is because the calculation is un-stored and is re-calculated based on the "reference" data within the Layout.  Please forgive me for not using proper terminology... I hope I'm being clear.

The relationship between the Performance Table and the Prepping Table in the "data entry" TOG is via the PerformanceID in the Performance Table.  The box to "create records in the Performance Table" has a check mark.  This also true in the Performance Calculation TOG.  

The Efficiency field in the Performance table for the specific activity of "clearing" looks like -

Efficiency = 1 / s_TotalTime / 60 / Case (_fk_TaskID = Clearing ; Prepping_Performance::c_NumberofFeet) 

where

- s_TotalTime = summary Total of Time

- c_NumberofFeet = a calculation of Ending Marker - Beginning Marker + 1

We would like to see the information created in the Prepping Layout in the data entry TOG in a Performance Layout of some sort.  Is there a way to do that? 

We understand FM can't store calculations that use summary field and related fields.  Is there a way around it?

 

Link to comment
Share on other sites

This topic is 3280 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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