Forum Discussion

Re: Import Actual Fiscal Weeks

Hi mark,

 

This helps. If I may ask one more question. I currently have a TRIR Year table and a TRIR Weeks table. Given your solution, and your first sentence with regards to setting up a new table with a single record for automation focus? – should that be a new table or should I use the TRIR year table?

 

My workflow for the user would be:

  • At the start of the year the safety manager will create a TRIR year record. This would trigger the automation to create the fiscal weeks.

 

Before I begin, I just wanted to clarify this. Do you see using 2 tables or 3 total.

Thanks

Bob

Bob Salaj

Director of Operational Excellence (OpEx)

 

Direct

724-820-1534

Mobile

412-335-8168

Web

LighthouseElectric.com

http://lighthouseelectric.com/sites/lighthouseelectric.com/files/lighthouse_electric_email_logo.jpg

http://lighthouseelectric.com/sites/lighthouseelectric.com/files/lighthouse_electric_email_facebook.jpghttp://lighthouseelectric.com/sites/lighthouseelectric.com/files/lighthouse_electric_email_linkedin.jpg

 



------Original Message------

My approach would be like this.

Set up a table with a single record and a field called Automation Focus with numeric fields called [Year] and [Record ID# of Parent Record]

Set up a table called 53 Weeks with exactly 53 records.

Make a relationship where 1 Year record has many weeks based on a formula reference field with a formula of 1.  Lookup the [Year]  and the [Record ID# of Parent Record] down to the 53 weeks table.

Make a formula date field in weeks with the following formula

var number YYYY = [Year lookup];

var date WeekRaw = FirstDayOfWeek(FirstDayOfYear(Date($YYYY,1,1))) + Weeks([Record ID#]);
If(Year($WeekRaw) =$YYYY, $WeekRaw)

Then make a saved table to table import from 53 Weeks into the child table, mapping the [Record ID# of Parent Record] into the field [Related Parent].  On that import filter where the Week is not blank.

On the parent record presumably there is some kind of Date field.  One way or the other, maybe by direct data entry, get the Year onto that record.

Create an Automation triggered by say a checkbox being edited on a Parent record.

Step 1. Modify the Automation focus record to copy in the Year and the Record ID#]
Step 2 Run the import.

That should do it!  Post back if you get stuck or contact me for direct one on one assistance.




------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------

1 Reply

  • MarkShnier__You's avatar
    MarkShnier__You
    Icon for Qrew Legend rankQrew Legend
    Right, I was not sure where these children were to be attached to.  But now I know that One TRIR Year has Many TRIR weeks.  So you can enter a TRIR Year and have that trigger the Automation, so no need for a Automation Focus table, so just the two tables which you already have.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------