You are viewing limited content. For full access, please sign in.

Question

Question

Pre-populate table rows with dates

asked on November 9, 2021

I'm building a form to submit timesheets and I'd like to auto-populate the dates based on the pay period selected and was wondering how to do that. I'm familiar with look up rules, but not sure how to do it in the rows on a table. Below you can see I want all the rows (a fixed number of 14 rows for 2 weeks) in the first column to populate automatically, this will be based on the pay period selected (an earlier drop down menu). 

 

0 0

Answer

SELECTED ANSWER
replied on November 10, 2021 Show version history

My PayPeriod Field was a Date field where they choose the start of the Pay Week

In your case of the PayPeriod being a Drop down, I'm assuming you may be showing as a Period is not seen as a date by Forms, but instead as a text field. In this case you would need to convert that DropDown value to a Date value in Forms and then use that field as the start date of the PayPeriod in the Formula.

 

FYI, I also hide the Table until the PayPeriod Field is selected

0 0

Replies

replied on November 9, 2021 Show version history

In your Date field in the Table I would use this formula

=SUM(PayPeriodFrom,SUB(ROW(),1))

In this example, PayPeriodFrom is the starting Date Field where you choose the starting Date for the Pay Period.

What this formula is doing is adding the Row # of the table to the starting date field. The reason for the SUB is to offset the increment by 1 as the First row is 1 and not 0.

0 0
replied on November 10, 2021

That half worked! It does populate all the dates, but just not the dates I want. Maybe I missed a step. I have my PayPeriod variable with the starting date of the period, and the following formula in the date field: =SUM(PayPeriod,SUB(ROW(),1))

It gives me this (and the Pay Period isn't even selected (when I do select there is no change):

 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.