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

Discussion

Discussion

Add a Single day to Current Date in Forms 11 New Designer

posted on September 12, 2024 Show version history

So, on the Table below when I click the +Add button I would like to increment the date field by 1 day.  I was thinking about using a function but from the Laserfiche function guide website page I can't seem to find a function that will allow me to do that. Unless I missed it. If this is not allowed is there a JavaScript that will allow me to get my goal accomplish here? Thanks in Advance

Time base If statement.png
0 0
replied on September 12, 2024

Look like you are using a travel form which is what I use this on as well. You can also have the dates populate based on the depart/return dates that are entered if you don't want the end user to have to add each day.  I used the script from this post: Modern Designer Javascript; Dynamically populating rows based on hidden field value - Laserfiche Answers 

I don't allow the next piece to show until the depart/return dates are entered. 

If you want to leave it viewable you can also use=IF(NewDateField<>"",NewDateField+(ROW()-1),"") so it looks clean.

2 0
replied on September 12, 2024

THANK YOUUUU!!!

0 0
replied on September 12, 2024

Use this formula in the date field: =NOW()+(ROW()-1)

0 0
replied on September 12, 2024 Show version history

Sweet!!! It work nicely!!! Thanks

So, instead of current date I'm trying it with a different date field. Something like this  =newDateField+(ROW()-1)

 

When I do that the is giving me a temporary date like 12/30/1899. But once I put a date on the new date field I do get the correct date and when I click on the +Add it does give the correct next sequence date.

Date1.png
Date2.png
Date3.png
Date4.png
Date1.png (3.97 KB)
Date2.png (3.12 KB)
Date3.png (4.21 KB)
Date4.png (6.9 KB)
0 0
replied on September 12, 2024

If you don't like it displaying the 12/30/1899 before the date is entered, you could try wrapping the formula in an IF statement. Like, =IF(newDateField <> "", newDateField+(ROW()-1), "")  (if the date field isn't blank, do the calculation, otherwise, do nothing)

1 0
replied on September 12, 2024

THANK YOUUUUU

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

Sign in to reply to this post.