Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column
width30%600px


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 field based on reporter's email

The customer field Defect Type is a drop down with the values: None, Production Defect and Development Defect. Production Defect is the default value. I have the problem with the default value in place and when it is removed. I want the Defect Type to change during the creation transition to Development defect is the Reporter's Email address matches an @gmail.com (for example) email address. Below is the Post Function I tried. I have also tried it with the values of Production Defect and Development Defect instead of 1 and 2.

Post Function on the Create initial transition.
The field Defect Type will be set according to the evaluation of Reporter's email against the following set of rules:
(@gmail.com)2
(.)1

You should write a valid regular expression in the first part of the rule (the part in brackets) and then the literal value of the option you want to select. You only need a rule to change the value when Reporter's email matches a "gmail.com" address. In any other case default value rules. See the screenshots:

Image Removed

Text to be parsed is: (.*gmail\.com$)Development Defect Image Added


Once configured, the transition will look like this:


Image RemovedImage Added



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"