--- title: "Review Page UI and App Variables" slug: "review-page-ui-and-app-variables" updated: 2023-01-10T14:14:36Z published: 2023-01-10T14:14:36Z canonical: "help.pillir.io/review-page-ui-and-app-variables" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # Review Page UI and App Variables The Review page is used to display the batches of records (i.e., logs). The logs added in one session are grouped into a batch. The End-User can do the following actions in the Review page: - View the count of records under each batch - Click the ‘**Details**’ button of a batch to view and manipulate its records - Select one or more batches and send it to the server The following image shows the UI design in Review page: ![7 Page 2_4 Review page in App Designer of EdgeReady Platform](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/7%20Page%202_4%20Review%20page%20in%20App%20Designer%20of%20EdgeReady%20Platform.png)I-24: Review page in App Designer of EdgeReady platformA list view component is used to display the list of batches. Each list item has the following components: - Check box (for selection). The Data for the checkbox is designed as described in [Review Page Scripts](https://help.pillir.io/docs/review-page-ui-and-app-variables#review-page-scripts): Review -> checkbox -> click event - Text fields (to display Batch Name, Batch Status, Batch Count) - Button (to navigate to Details page) Since this page displays all batches and its associated count of records, it makes use of a table data structure with BatchName and its associated Count. There are additional columns like Flag, Status and Enable included to build logic on this page. These columns would be explained under section [Review Page Scripts](https://help.pillir.io/docs/review-page-ui-and-app-variables#review-page-scripts): Review -> button_moveToSAP -> click event | Functionality | Component | App Variables | Data Type | | --- | --- | --- | --- | | View list of batches | Go to Home Page | Header | Table | | Option to select batches | Checkbox | Header.Flag | Number (0/1) | | View Batch Name | Text | Header.BatchName | String | | View Count associated with each batch | Text | Header.Count | Number | | View Status of each batch Valid Statuses include: *Unsynced, Submitted to SAP, Deleted* | Text | Header.Status | String | | A button against each batch | Button | Header.Enable | String (True/False) | | A button to send selected batches to server | Button | -NA- | | | Go to Home Page | Button | -NA- | | Table 2-1: App variables in Review page ## Review Page Scripts On clicking the Review menu from the bottom bar, all batches created in this device are shown. ### Review -> onPageShow event In the onPageShow event, the count of records under each batch is computed and updated in the ‘Header’ variable. As discussed in section [Review Page UI and App Variables](https://help.pillir.io/docs/review-page-ui-and-app-variables), the Header variable is mapped to the List View component in Review page. The following images shows a script snippet: ![33 Snippet 2-1 Review - PageShow event](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/33%20Snippet%202-1%20Review%20-%20PageShow%20event.png)I-25: Review - PageShow event ### Review -> checkbox -> click event When the checkbox in the Review screen is selected, the checkbox value is mapped to Header.Flag. No script is necessary. Observe the Selected property of the checkbox in the screenshot below: ![34 Page 2_4 Review - How to map value for a selected checkbox](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/34%20Page%202_4%20Review%20-%20How%20to%20map%20value%20for%20a%20selected%20checkbox.png)I-26: Review - How to map value for a selected checkbox ### Review -> button_details -> click event On click of the Details button against a batch, the assigned Interactions will do the following: 1. Take user to the Details page of the corresponding batch 2. Persist only the selected batch object from Header variable View the Interactions property of Details button in the screenshot below: ![35 Page 2_4 Review - How to set Interactions for Details button-New](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/35%20Page%202_4%20Review%20-%20How%20to%20set%20Interactions%20for%20Details%20button-New.png)I-27: How to set Interactions for Details button Review -> list item click event Additionally, as required for the App logic, it will be useful to copy the BatchName of a selected batch into a primitive business function variable. Therefore the following variable is introduced and its value is populated in the List view component’s item click event. | Data Source | Variable | Data Type | | --- | --- | --- | | Header.BatchName | selected_BatchName | String | Table 2-2: Variable Populated in the List view item event ![36 Snippet 2-2 Review - listview item click](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/36%20Snippet%202-2%20Review%20-%20listview%20item%20click.png)I-28: Review - listview item click ### Review -> button_moveToSAP -> click event On clicking the ‘Move to SAP’ button in Review page, the BOS_initiateMoveToSAP is invoked and it posts the selected batches to the server. As part of App logic, the batches sent are disabled for further selection/changes (Header.Enable), Status is updated as ‘Submitted to SAP’ (Header.Status) and the selection is reset from one to zero (Header.Flag). Header.Enable is mapped to Enabled property of checkbox and Details button in Review page. This disables these two components against the batches submitted to SAP, therefore preventing re-selection and preventing navigation to Details page to avoid adding/updating/deleting the already submitted records. Refer the following script snippet for the logic: ![37 Snippet 2-3 Review - Move to SAP button click event](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/37%20Snippet%202-3%20Review%20-%20Move%20to%20SAP%20button%20click%20event.png)I-29: Review - Move to SAP button click event Note that some business function variables are used to enable Progress bar while posting selected batches to server. Refer table below: | App Variables | Type | | --- | --- | | boolShow_progressbar | String (True/False) | | status_progressbar | String | | perc_progressbar | Decimal | Table 2-3: Variables to enable Progress bar The above mentioned variables are mapped in the Progress bar properties as shown below. ![40 Image progressbar_sendSelectedBatches](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/40%20Image%20progressbar_sendSelectedBatches.png)I-30: Progress bar properties ### Review -> button_back -> click event On clicking the back button in Review page, the End-User is shown the Home page where the user can add logs to the current batch. On navigating to Review page or Details page, the active BatchName might have changes based on user actions. Therefore, it is necessary to reassign current BatchName (BatchName_current) back to BatchName. However, if BatchName is empty at this point, it means the active batch was moved to SAP through Review page or is Deleted through Details page. In that case, the Home page is loaded with BatchName as empty and the appropriate app flow is undertaken to re-initialize App variables for a new batch. Refer the following screenshot for button_back script: ![41 Snippet 2-6 Review - button_back on click event](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/41%20Snippet%202-6%20Review%20-%20button_back%20on%20click%20event.png)I-31: Review - button_back on click event Developing Business Logic BOS for Review Page ### BOS_initiateMoveToSAP This BOS posts all Logs under one selected batch to the server. Refer [Appendix C](https://help.pillir.io/docs/appendix-c) for Database schema of table that will store the transaction data. Refer screenshot below for Input variables, Post operation and Error handling: ![50 BOS 1-1 BOS_initiateMoveToSAP - Input Variables](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/50%20BOS%201-1%20BOS_initiateMoveToSAP%20-%20Input%20Variables.png)I-32: BOS_initiateMoveToSAP - Input  Variables ![51 BOS 1-2 BOS_initiateMoveToSAP - Post transaction data](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/51%20BOS%201-2%20BOS_initiateMoveToSAP%20-%20Post%20transaction%20data.png)I-33: BOS_initiateMoveToSAP - Post transaction data ![52 BOS 1-3 BOS_initiateMoveToSAP - If post failed, update Batch Status (with the batch table as Output variable) and terminate the BOS](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/52%20BOS%201-3%20BOS_initiateMoveToSAP%20-%20If%20post%20failed,%20update%20Batch%20Status%20(with%20the%20batch%20table%20as%20Output%20variable)%20and%20terminate%20the%20BOS.png)I-34: BOS_initiateMoveToSAP-If post failed, update Batch Status(with the batch table as Output variable) and terminate the BOS