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.
Before you begin
- You must have a basic understanding of progressive web applications and their development.
For more information, see Developing a Progressive Web Application. - 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.
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/Menu Field, 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
tableFieldI
D
Enter the following values ofselectionMode
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$
, wheretableField
andtableName
are names of the table field table. The value ofselectionMode
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.
Comments
How to programmatically select n-th row in table field? The method used for "standard" views does not work in PWA.
Hello Robert,
Thank you for your comment.
We are working on getting these details.
Hello Robert,
Could you please help us with the following additional details to help you.
Log in or register to comment.