Re: number increment reset annually on given date
hi Bof
i am facing the same issue but my code get stopped in november
i tried two code:
code 1
If(Month(Today())>=11&&Day(Today())>=1,Dropdown24_1.Selected.Value&"-DIS-"&Year(Today())+1&"-001",Dropdown24_1.Selected.Value&"-DIS-"&Text(DateAdd(Now(),2,Months),"[$-en-US]yyyy")&"-"&Text(Value(TextInput27_5.Text)+1,"[$-en-US]000"))
Code 2:
With(
{
wUS_CASE: Dropdown24_1.Selected.Value &"-DIS-"&Year(Today())+1 &"-001",
wLastID: First(Sort( DISLIST, Case_Number, Descending )).Case_Number
},
If(
Month(Today()) >= 11 && Day(Today()) >= 1 &&
CountRows( Filter( DISLIST, Case_Number = wUS_CASE ) ) = 0,
// then case
wUS_CASE,
// else case
Left(wLastID,13) & Text( Value( Right( wLastID,3 )) + 1, "00")
)
)
in both the case i am not able to submit the form after nov 1. Until oct 31 it was working fine.,
thank you in advance