Creating list tables and setting selection mode by using run processes in Progressive Web Applications
As a Remedy developer, you can create a table which can switch between selection modes. You can design a workflow that returns values which in turn are used by the PERFORM-ACTION-TABLE-ROW-SELECTION-MODE command to switch table lists between multiple selection, single selection, or view-only.
You must create forms which contain the information that you want to display in the table. In the following procedure, we map this form to the list table we create.
You may have to define workflows that return values that can be used by the PERFORM-ACTION-TABLE-ROW-SELECTION-MODE command.
To create a list table and set the selection mode by using a run process in a Progressive Web Application
Step 1: To create a progressive view with a table showing information
In Developer Studio, create a regular form.
Create a Progressive View.
Steps (2)
Form > Create New View. The Create New View dialog box opens.
In the View Type list, select Progressive.
From the Palette, drag and drop Table - List View into the view.
In the Properties tab, at Attributes > Tree/Table Property, in the Value column, click the ellipsis () button. The Tree/Table Property dialog opens.
Search for a form name and map the Table Columns to fields from a remote form. For example if the table needs to show a list of departments and geographical locations, you can accordingly add remote forms with this information.
From the Palette, drag and drop Button into the view. You can rename the button to indicate its function. In this example, rename it to Multiple to Single Select.
Save the form.
Step 2: To create an active link and add the Run Process command
Select the button and create a new active link. Select New > Active Link.
Select a server in the Select Server dialog box. The Untitled Active Link screen appears.
In the Associated Forms section, click Add. The Form Selector dialog box opens.
Select the form in the Progressive View which has the table and the button.
In Active Link > Execution Options > Button/MenuField, select the button that triggers the active link.
Right-click the If Action panel header.
Select Add Action > Run Process.
In the Command Line field, enter the following command: PERFORM-ACTION-TABLE-ROW-SELECTION-MODE selectionMode tableFieldID Enter the following values of selectionMode to make a corresponding switch in selection modes of the lists:
Value of selectionMode
Selection mode of list switches from
0
Any selection mode to multiple selection mode
1
Any selection mode to to view-only
2
Any selection mode to to single selection
In place of tableFieldID, you can also add $tableField$ or $tableName$, where tableField and tableName are names of the table field table. The value of selectionMode can be passed by another field based on how you design active links but the values must be one among 0, 2, or 1.
Save the active link.
Results
When you display this form in progressive views, you can see a table list and a button that allows you to change the form, for example, multiple selection to a single selection, if you add 2 as the value of selectionMode in the command.