Forum Discussion
Thanks for your response Bojan.
Scenario is to check first row of the weekof < post_prod_support7. If it’s true I need to add 7 days to weekof and append second row with no change in other columns.
Next is to check second row of the weekof < post_prod_support7. If it’s true I need to add 7 days to weekof and append third row with no change in other columns.
Next is to check third row of the weekof < post_prod_support7. If it’s true I need to add 7 days to weekof and append forth row with no change in other columns.
.
.
.
likewise it has to add records with only change in weekof field value alone, till above condition is false.
I tried the expression you shared earlier and getting a different issue. PFA. Any tip will be helpful.
Regards,
Amar.
These are Date types, as we said before, you have to parse them, than do the operations. Try this:
sl.range(0,((Date.parse($post_prod_support7)-Date.parse($weekof))/86400000)+1).filter(x=>x%7==0).map(y=>Date.parse($weekof).plusDays(y).toLocaleDateString())