Help

Change value at weekly intervals

Topic Labels: Formulas
Solved
Jump to Solution
1531 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Ava_Schmidt
4 - Data Explorer
4 - Data Explorer

Hello!
I am trying to set up a timesheet in Airtable and I want a formula or automation to assign a new pay period every two weeks.
I don’t care if it is just a number (pay period= 1,2,3,4…etc.) or a single select field or something else!
I just need to indicate a change in the default entry every two weeks.
My first thought was to set up an automation and set the trigger as a scheduled time (every two weeks). But, I keep hitting a roadblock when trying to set up the action. I do not want to FIND, UPDATE, or even CREATE records… I just want the default field entry for new records to change every two weeks.
In my mind, the sentence would be “Every two weeks, add 1 to the pay period number.”
Any thoughts on how to get this done??
Thanks to anyone in advance!

1 Solution

Accepted Solutions
Alexey_Gusev
13 - Mars
13 - Mars

Hi,
I think you don’t need automation for that.
Suppose you have ‘Created time’ field in your table. If not, you can add one (and make it hidden).
Then, you pay period field can be a formula
INT(WEEKNUM(FieldName)/2)

See Solution in Thread

4 Replies 4
Alexey_Gusev
13 - Mars
13 - Mars

Hi,
I think you don’t need automation for that.
Suppose you have ‘Created time’ field in your table. If not, you can add one (and make it hidden).
Then, you pay period field can be a formula
INT(WEEKNUM(FieldName)/2)

Welcome to the Airtable community!

The only way to set the default value for a field is by manually reconfiguring the field.

On the other hand, there are other ways to make data entry easier. For example, if you group by an editable field in the grid view, when you create a new record for a particular group, that new record will automatically have the value for the group.

You can also look into a two table system. Have one table for pay periods, and pre-create as many pay periods as you like. Then in your main table, have a linked record field that links to a pay period. Then group your main table by the pay period. For the first record of a pay period, you will need to select the new pay period, but then for each additional record in those two weeks, just add a new record in the grouped view and the pay period will be automatically filled in.

Thank you!! This works for me. Any thoughts on making weeknum start the week on Saturdays? It seems Airtable only supports Sundays and Mondays.
Thanks again.

Use DATEADD(Fieldname,1,‘days’) instead of Fieldname in your formula.