cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Date Calculation on String Field Default Value for Fiscal year

Jump to solution

I'm attempting to do what I thought would be a simple default value calculation on a field in Nintex form.   All I'm trying to do is calculate the fiscal year based on if month is higher than 9, add one to the year value.    The if statement works but I can't figure out how to increment the year by 1.    If I try to do "+1" all I get is 2016+1 instead of 2017.    Any help would be appreciated.  

fn-If(fn-GreaterThan(fn-FormatDate(Current Date, "MM"),9), fn-FormatDate(Current Date,"yyyy"),fn-FormatDate(Current Date,"y"))

Thanks,

Brad

Labels: (3)
0 Kudos
Reply
3 Replies
Highlighted
Automation Master
Automation Master

Re: Date Calculation on String Field Default Value for Fiscal year

Jump to solution

Hi Brad,

This might work on the calculated field: If(greaterThan(formatDate(Current Date,"MM"),9), "FY"+formatDate(dateAddMonths(Current Date,3),"yyyy"),"FY"+formatDate(Current Date,"yyyy"))

Text field takes it up as a string and appends it. Hope it helps.

View solution in original post

Reply
Highlighted
Not applicable

Re: Date Calculation on String Field Default Value for Fiscal year

Jump to solution

Hi Kapil and thank you for your reply.    I do not see the dateaddmonths as available options in the inline functions of my default value formula box.    I see them in other calculated areas but not in the "Specify default value" work area.    I tried to create a form variable or a calculated value and use it as a value but the named controls option is also missing.    There must be some limitation since it's for default value or something.    

Reply
Highlighted
Automation Master
Automation Master

Re: Date Calculation on String Field Default Value for Fiscal year

Jump to solution

Hi

If the issue is resolved, please post the resolution and mark it as answer to help other on the community.

Reply