Populate dates based on Week of the month


Badge +2

Hi,

I'm need help. I want to populate date based on week that I select. Example, if I select field W1 of July, it will auto populate date on the days field that I have.

Kindly advise. Thanks


3 replies

Userlevel 5
Badge +14

what do you exactly mean to populate dates? I don't see any date field on your screenshot.

or do you mean to append to Mon (eg.) 01.07.2018, to Tue 02.07.2018, etc?

how do you have layouted those date fields, are they single fields (one field for each day) or are they within repeating section, or ...?

haven't you thought to use regular date control to select a respective week (resp. starting date)?

then you could calculate dates within the week simply like StartingDate+0, StartingDate+1 ... StartingDate+7 (or DateAddDays(StartingDate,0)... )

 

if you wanted to restrict date control not to allow to select other (starting) date then (eg.) first day of week, you could do it as follows

https://community.nintex.com/message/77011-re-adding-options-in-choice-fields-dynamically-in-nintex-forms-2013?commentID… 

Badge +2

Hi Marian Hatala‌,

Thanks for the info. Now I'm using DateAddDays(..) for the date field but I want the date to be changed when I select Week2, Week3....The date field is within repeating table.

Not sure if this can be done? Please help...I'm still new with nintex. Thanks.

Userlevel 5
Badge +14

what about formulas like 

DateAddDays(StartingDate, (subString(Week,1,1) -1)*7 + 0)
DateAddDays(StartingDate, (subString(Week,1,1) -1)*7 + 1)
...‍‍‍‍
DateAddDays(StartingDate, (subString(Week,1,1) -1)*7 + 6)

Reply