Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2.7.0


Section


Column
width600px


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1



Column




Features used to implement the example



Example: Set a date based on current date

In this example a date will be set based on a choice in a the value of a select list custom field and the current date.

Based on a custom field (single select list) with optoins the options "monthly" and "quarterly" another custom date field "Time limit" should be set.


Case 1: Selecting "monthly"By selecting this option, the custom date field

  • "Time limit" will be set to the last day of the next month.

Case 2: Selecting "quarterly"The field

  • "Time limit" will be set to the last day of the quarter, e.g.
Example:
  • Creating
the
  • an issue on 22/Feb
will set
  • , "Time limit" will be updated to 31/Mar.


Note: For this example 2 , two custom fields are needed:

  • Custom select Select list (single choice) "Frequency" with options [monthly, quarterly]two options: monthly and quarterly
  • Date Custom date picker "Time limit"


For this we need the post function This can be done using the Set a field as a function of other fields. The configuration looks like the following: post function.


Text to be parsed is:

(Monthly)lastDayOfTheMonth(addMonths({00057}, 1, LOCAL), LOCAL)
[month({00057}, LOCAL) in [{JANUARY}, {FEBRUARY}, {MARCH}]]dateTime(year({00057}, LOCAL), 3, 31, 0, 0, LOCAL)
[month({00057}, LOCAL) in [{APRIL}, {MAY}, {JUNE}]]dateTime(year({00057}, LOCAL), 6, 30, 0, 0, LOCAL)
[month({00057}, LOCAL) in [{JULY}, {AUGUST}, {SEPTEMBER}]]dateTime(year({00057}, LOCAL), 9, 30, 0, 0, LOCAL)
[month({00057}, LOCAL) in [{OCTOBER}, {NOVEMBER}, {DECEMBER}]]dateTime(year({00057}, LOCAL), 12, 31, 0, 0, LOCAL)


Note that:

  • {00057} is field code for field "Current date and time"


Once configured, the transition will look like this:




Other examples of that function

Incoming Links
pageSet a field as a function of other fields
labelsexample



Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label = "post-function"