Print      Open PDF Version of Online Help


Previous Topic

Expression Builder Examples

In Expression Builder, you can use the sample expressions in the following table.

Expression Builder Sample Expressions

Update the field Opportunity Margin

Description

Update the field Opportunity Margin

Syntax

[<OpportunityMargin>] = [<OpportunityRevenue>]-[<OpportunityCost>]

Validate small deals

Description

Field Validation. 'Small Deal' cannot have revenue greater than 1,000,000

Syntax

<= IIf (FieldValue('<OpportunityCategory>') = 'Small Deal', 1000000, [<Revenue>])

Assign a newly-created Service Request to the creator

Description

Whenever a Service Request is created, set UserId as the default for the Service Request field 'Owned By Id'.

Syntax

[<OwnerId>] = UserValue('<UserId>')

Check if the values of specified fields have changed

Description

Check for changes in field values

Syntax

(PRE('<ActualCost>') <> [<ActualCost>]) OR (PRE('<BudgetedCost>') <> [<BudgetedCost>])

Trigger a workflow based on a close date

Description

If the close date is modified by more than a month, execute the workflow.

Syntax

([<CloseDate>] - PRE('<CloseDate>')) > 30

Trigger a workflow if an opportunity reaches a certain stage without a contact

Description

If an opportunity reaches the Closed/Won sales stage without having a contact, execute the workflow.

Syntax

FieldValue('<SalesStage>') = "Closed/Won" AND PRE('<SalesStage>') <> [<SalesStage>] AND [<KeyContactId>] = "No Match Row Id"

Trigger a workflow when a check box is selected

Description

If the custom Ready for Review check box field is selected, execute the workflow.

Syntax

FieldValue('<bReady_for_Review_ITAG>') = 'Y' AND (PRE('<bReady_for_Review_ITAG>') = 'N' OR IfNull(bReady_for_Review_ITAG, 'Y') = 'Y' )

Check whether the current user is the record owner

Description

Check whether the owner of a record is the current user. In this case, the IfNull function is used because the Owner field might be null.

Syntax

IfNull([<OwnerId>],"Invalid") = UserValue('<UserId>')

Trigger an email when Account type is changed

Description

Trigger an email when Account type is changed from "Prospect" to "Customer"

Syntax

PRE('<AccountType>') = "Prospect" AND FieldValue('<AccountType>') = "Customer"

Exclude a specific channel from a workflow

Description

Do not execute a workflow for an online record

Syntax

PRE('<CampaignType>') = "Advertisement" AND ExcludeChannel("Online")

Related Topics

See the following topics for related Expression Builder information:


Published 5/4/2012 Copyright © 2005, 2012, Oracle. All rights reserved. Legal Notices.