Validation Helper Functions Blocking Analyses in Answers

18-22 System Administrators Guide for Oracle Business Intelligence Enterprise Edition 3. Create a write-back template that specifies the SQL statements that are necessary to both insert and update values into the table that you created. For more information, see Section 18.7.3, About the Write-Back Template. 4. Add the LightWriteback element in the instanceconfig.xml file, as described in Section 18.7.2.1, Setting the LightWriteback Element. 5. In Oracle BI Presentation Services, grant the following write-back privileges to the appropriate users: Manage Write Back and Write Back to Database. For information, see Managing Presentation Services Privileges in Oracle Fusion Middleware Security Guide for Oracle Business Intelligence Enterprise Edition. 6. Configure a write-back analysis, as described in Process for Write Back in Oracle Fusion Middleware Users Guide for Oracle Business Intelligence Enterprise Edition.

18.7.2.1 Setting the LightWriteback Element

For users to write back values, you must manually add the LightWriteback element in the instanceconfig.xml file. Before you begin this procedure, ensure that you are familiar with the information in Section 3.4, Using a Text Editor to Update Configuration Settings. To manually set the element for write back: 1. Open the instanceconfig.xml file for editing, as described in Section 3.6, Where Are Configuration Files Located?

2. Locate the ServerInstance section in which you must add the LightWriteback

element.

3. Include the element and its ancestor elements as appropriate, as shown in the

following example. WebConfig ServerInstance LightWritebacktrueLightWriteback ServerInstance WebConfig Note that this example does not include parameters that might exist in the file, but that are centrally managed by Fusion Middleware Control and cannot be changed manually. 4. Save your changes and close the file. 5. Restart Oracle Business Intelligence.

18.7.3 About the Write-Back Template

The write-back template is an XML-formatted file that contains SQL statements that are needed to insert and update records in the write-back table and columns that you have created. You can create multiple write-back templates, customizing each one for the fields that are used in each specific analysis. In the table view properties, you specify the name of the write-back template to use.

18.7.3.1 How Write Back Works

If a user has the Write Back to Database privilege, then the write-back fields in their analyses can display as editable fields if properly configured. If the user does not have this privilege, then the write-back fields display as normal fields. If the user types a value in an editable field and clicks the appropriate write-back button, then the Configuring and Managing Analyses and Dashboards 18-23 application reads the write-back template to get the appropriate insert or update SQL command. It then issues the insert or update command. If the command succeeds, then it reads the record and updates the analysis. If there is an error in either reading the template or in executing the SQL command, then an error message is displayed. The insert command runs when a record does not yet exist and the user enters new data into the table. In this case, a user has typed in a table record whose value was originally null. The update command runs when a user modifies existing data. To display a record that does not yet exist in the physical table to which a user is writing back, you can create another similar table. Use this similar table to display placeholder records that a user can modify in dashboards.

18.7.3.2 Requirements for the Write-Back Template

The write-back template must meet the following requirements: ■ To meet security requirements, you must specify the connection pool along with the SQL commands to insert and update records. These SQL commands reference the values that are passed in the write-back schema to generate the SQL statements to modify the database table. Values can be referenced either by column position such as 1, 3 or by column ID such as {c1234abc}, {c687dfg}. Column positions start numbering with 1. The use of column ID is preferred. Each column ID is alphanumeric, randomly generated, and found in the XML definition of the analysis in the Advanced tab of the Analysis editor. ■ You must include both an insert and an update element in the template. If you do not want to include SQL commands within the elements, then you must insert a blank space between the opening and closing tags. For example, you must enter the element as insert insert rather than insertinsert If you omit the blank space, then you see a write-back error message such as The system cannot read the Write Back Template my_template. ■ If a parameters data type is not an integer or real number, then add single quotation marks around it. If the database does not do Commits automatically, then add the optional postUpdate node after the insert and update nodes to force the commit. The postUpdate node typically follows this example: postUpdateCOMMITpostUpdate ■ Store the write-back template files in the analyticsRes directory that the administrator has configured for static files and customer messages: ORACLE_ INSTANCEbifoundationOracleBIPresentationServicesComponentcoreapplicati on_obipsnanalyticsRescustomMessages While XML message files that affect a language-specific user interface must be localized, the XML file that is used for configuring a write-back template is usually not translated, because it is language-independent. In the rare cases where write-back template files must be language-dependent for example, if a user logging in using the l_es Spanish locale would use a different