How can I display the current Quarter and Year in a label?

  • 18 October 2016
  • 5 replies
  • 19 views

Badge +3

Need help displaying the current year and quarter in a label control using Nintex Forms.

I have a calculated value column in the list with a default value formula that displays the correct year and quarter, but when using this field in the Nintex Form it doesn't calculate and display the value at form load.

Calculated Value Formula (using Modified date field):

=ASC(YEAR([Modified]))&"-"&IF(MONTH([Modified])<4,"Q1",IF(MONTH([Modified])<7,"Q2",IF(MONTH([Modified])<10,"Q3","Q4")))

Anyone that can help with a formula I can use in the Insert Reference section, or another alternative solution to this requirement, would be greatly appreciated.

Thanks!


5 replies

Badge +11

Hi Kel Tunstall,

Use calculated Value instead of label and use the below formula:

formatDate(Current Date,"yyyy")+"-"+If(formatDate(Current Date,"MM")<4,"Q1",If(formatDate(Current Date,"MM")<8,"Q2",If(formatDate(Current Date,"MM")<11,"Q3","Q4")))

If you copy and past, choose the Current Date from the common tab again. Instead of Current Date, replace it with your date field.

Userlevel 5
Badge +14

I think you will have to decide what will be responsible for year/quarter recalculation.

if you decide for sharepoint (calculated item's field), it will recalculate automatically AFTER every change made to the item.

advantage is that it will follow all the changes made to the item, ie. even ones made out of the form - eg. by workflow(s) or in quick edit sheets.

disadvantage is that in form you will only be able to show the fields value, ie. quarter of last/previous change. (you may fool users by calculating it in the form independently from item's field and not writing it back to list item. but I would not personally do that since it might lead to confusions)

if you let it to calculate by form, you can present 'actual' value to the user. but you might miss changes made aside.

so you need to evaluate your requirements and decide which approach suits you more.

Badge +3

This worked great, thank you!

Badge +3

Thanks for this.  I needed the Quarter in the title header of a section of the form and it needed to be dynamic, but only needs to be calculated when the item is created and will remain as is for that item.

Badge +4

Hi

I have a similar requirement. I need a calculated field to display the current financial year in the format "2018-2019". Financial year in Australia is 01 July to 30 June.

Can anyone help me with the formula for this?

Thanks

Reply