You can use the Add JavaScript File
wizard to add a JavaScript file
to a JavaScript policy.
The JavaScript file will
apply to an attribute in a source entity in the service. After you
add the file, you can use an editor to add an expression to the file.
To add a JavaScript file
to a JavaScript policy:
- From the Data Project Explorer, expand the Services folder
and then open the service request that contains the service plan with
the policy.
- Double-click the Service Plan node. The service plan editor opens.
- In the Target Policies list, select
the JavaScript policy. The JavaScript Policy
editor opens.
- Click Add JavaScript. The Add JavaScript File
wizard opens.
- Complete the steps of the wizard.
You must
select an attribute to which the JavaScript file
will apply, and enter a file name.
After you
complete the wizard, an editor will open.
- Use the editor to enter a JavaScript expression in the file.
- Click to save the file. The file will be
listed in the JavaScript Policy
editor and stored in the Other Files folder
in the Data Project Explorer.