IF Expression on a Drop-Down and Date Field | Community
Skip to main content
Level 4
May 19, 2025
Solved

IF Expression on a Drop-Down and Date Field

  • May 19, 2025
  • 1 reply
  • 490 views

I am trying to create a calculated field in an Issue Custom Form to auto-populate a date for users.

I am able to code the date using the 'ADDWEEKDAYS()' expression based on a custom date field used earlier in the form but I would like to add a certain complexity based on an another selection made  in a drop-down custom field with three options 'BAU, Existing or New'.

Each of the three drop-down options would result in the generation of a different date based on the date field earlier in the form. 

Does anyone know how I could use the 'IF' expression to code the three different possibilities and for the field to have the capacity to generate three different dates when taking the date field and the drop-down in conjunction?

Best answer by _Manish_Singh

Hello @thomasne2, I'll make few assumptions here as the instructions are not clear.

Let’s assume:

  • DE:Date is the custom date field.
  • DE:IssueType is the drop-down field with values: 'BAU', 'Existing', and 'New'.

And the expected output is:

  • If IssueType = 'BAU', add 2 weekdays.
  • If IssueType = 'Existing', add 5 weekdays.
  • If IssueType = 'New', add 10 weekdays.

Then,

IF({DE:IssueType} = "BAU", ADDWEEKDAYS({DE:Date}, 2), IF({DE:IssueType} = "Existing", ADDWEEKDAYS({DE:Date}, 5), IF({DE:IssueType} = "New", ADDWEEKDAYS({DE:Date}, 10), "")))

 

1 reply

_Manish_Singh
_Manish_SinghAccepted solution
Level 9
May 20, 2025

Hello @thomasne2, I'll make few assumptions here as the instructions are not clear.

Let’s assume:

  • DE:Date is the custom date field.
  • DE:IssueType is the drop-down field with values: 'BAU', 'Existing', and 'New'.

And the expected output is:

  • If IssueType = 'BAU', add 2 weekdays.
  • If IssueType = 'Existing', add 5 weekdays.
  • If IssueType = 'New', add 10 weekdays.

Then,

IF({DE:IssueType} = "BAU", ADDWEEKDAYS({DE:Date}, 2), IF({DE:IssueType} = "Existing", ADDWEEKDAYS({DE:Date}, 5), IF({DE:IssueType} = "New", ADDWEEKDAYS({DE:Date}, 10), "")))

 

ThomasNe2Author
Level 4
May 20, 2025

Hi Manish 

Thanks so much for this! I added the first expression related to BAU and it worked perfectly. I have then added the expression for Existing, separated by a comma but I am getting an error. Should I be separating them a different way? 

_Manish_Singh
Level 9
May 20, 2025

After '-14', you just need one closing bracket. Similarly, after -18 just one closing bracket.