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

Question

Question

Dynamically add rows based on date selection (Start and End Dates)

asked on November 2, 2017

Hi,

 

Not sure if this has ever been requested, but we have a scenario where a client has asked if possible, that based on the Start Date and End Dates selected, a table is created? 

 

Basically, if they are to select 1/11/2017 as the start date and then 10/11/2017 as their end date, a table is then created for each of those dates in the following view:

 

1/11/2017 Wednesday 

2/11/2017 Thursday

3/11/2017 Friday

4/11/2017 Saturday 

etc.. 

 

In this instance, the client requires a 14-day roster be created based on the dates as the end date is auto-calculated based on their start date. 

Is this possible with using Forms? 

 

 

Thank you in advance, 

 

Regards

Ziad

0 0

Answer

SELECTED ANSWER
replied on November 2, 2017

Hi Ziad,

 

In the case of Weekdays, you could use something like this:

 

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(WEEKDAY(({Start Date}+(ROW()-1)), 2),"1","Monday"),"2","Tuesday"),"3","Wednesday"),"4","Thursday"),"5","Friday"),"6","Saturday"),"7","Sunday")

 

Again, this would be where {Start Date} is the reference to the start date field. It's not perfect but it does the job.

 

Regards,

Luke Dawson

0 0

Replies

replied on November 2, 2017

Hi Ziad,

 

To calculate the Date per row, you can use something like:  ={Start Date}+(ROW()-1)

Where {Start Date} is the reference to the start date field.

 

Regards,

Luke Dawson

1 0
replied on April 3, 2018

Thank you Luke

Awesome solution!!!

yes

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

Sign in to reply to this post.