Using Expressions To Add Logic To Page Composer

The simplest way to illustrate this is with an example. Please play the 5 minute video from our YouTube channel below to see it in action.

In addition, the following simple examples show other types of uses and can be applied wherever the component property has been enabled in Page Composer. Also more on Expression Language and its syntax can be found here.

1. Set a field property to TRUE based on the amount of the Total field

  • #{bindings.Total.inputValue > 500}

2. Set the Display property toTRUE if flexfields are setup (i.e. the number of segments defined is not zero)

  • #{!(bindings._FLEX_NumOfSegments.inputValue ==0)}

3. Set the Display property to TRUE based on another field being not ‘Y’ or a specific user role being involved:

  • #{bindings.ChangeOrderFlag.inputValue != ‘Y’ || bindings.OriginatorRole.inputValue != ‘SUPPLIER’}

4. Return two fixed values for a text field based on a value from the VendorName field.

  • #{bindings.VendorName.inputValue==”Capp Consulting” ? “High Priority” : “Low Priority”}

5. Check for an empty value in the field and if it exists put in a default text value.

  • #{bindings.VendorName.inputValue==”" ? “Default Description”}

6. Use a default value for a text field that includes run-time values taken from other fields on the page.

  • This is a manually sourced order for: #{bindings.VendorName.inputValue} from #{bindings.PrcBuName.inputValue}

In addition to these simple Page Composer based examples, more validation can be added through Groovy expressions in Application Composer, currently available in the CRM product family. Check out this video which shows more on this topic.

Please bear in mind that some limitations in page design may prevent the exposure of properties and their evaluation using expressions. Also most of the time the validation is simple and fixed, without support for things like translations or fully implementing security. The recommendation is to see how similar pages within a product feature use expressions and to use these examples to run your own tests. If you have other examples or observations please use the comments below.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow us on twitter Fusion Applications Extensibility, Customizations and Integration forum Fusion Applications Dev Relations YouTube Channel
This blog offers news, tips and information for developers building extensions, customizations and integrations for Oracle Fusion Applications.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
4
5
6
8
11
12
13
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today