RobSalaj
5 years agoQrew Cadet
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 | |
------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
------------------------------