To make changes that apply to everyone in a specific country, you can make
country-level customizations. For example, you want to make the Date of
Birth field required for anyone in the UK adding or editing a contact. For
all other countries, the field remains optional. Here's how you can make those changes using
a country code in the expression.
Here's what to do
-
Go to .
-
Enter your sandbox.
-
Go to and open the page where you want to make the country-level change. For
example, to change the New Contact page, go to . Then in the People to Cover section, click
+Add.
-
On the Settings and Actions menu, click Edit
Pages.
-
Confirm that the edit page header has Edit Layer: Site -
SITE.
-
On the Structure tab, select the field that you want to customize, such as
Date of Birth.
-
On the Confirm Shared Component Edit dialog box, click
Edit.
-
On the Source pane, click the Show the properties of...
icon, such as Show the properties of inputDate or
Show the properties of inputText.
-
On the Component Properties dialog box, for the appropriate field, such as
Required, select Expression
Builder.
-
On the Expression Editor dialog box, in the Type a value or
expression field, enter the appropriate expression. Here's the
expression to make the field required for people in the UK:
#{row.bindings.DateOfBirth.hints.mandatory or (sessionScope.BEN_CountryCode eq 'UK' ? true : false)}
-
Click OK.
-
On the Component Properties dialog box, click
Apply.
-
Click OK.
-
To render your changes, on the page, click Close.
-
To verify your changes, on the Sandbox Mode: Edit menu,
select Preview as if Published (Context: All).
-
To publish your changes, on the <YourSandboxName>
menu, select Publish.