Example: Temporarily displaying table rows on the screen


In the following form, users create project teams by moving names from the Available Employees table to the Team Members table.

example_153_0_web.GIF
AR System server can update the on-screen results each time a name is moved between tables without making any calls to the server and database until the user decides to save her changes. At that point, calls are made only to delete and add rows because the on-screen tables are up-to-date and thus do not need to be refreshed. This reduces client/server interaction by 50 percent.

For example, to create a team that includes Bob Burke and Fred Fairchild, a user and AR System server might perform these steps:

  1. User—Select Fred Fairchild in the Available Employees table, and click the right arrow button.
    example_153_1_web.GIF
  2. Remedy AR System server—On button click, execute an active link that performs these actions:

    1. Executes this Run Process command to delete row 6 from the Available Employees table on-screen:
      PERFORM-ACTION-TABLE-DELETE-ROWAvailableEmployeesTableFieldID6
      6 is the index of the row in memory. Although the row is no longer visible on-screen, it is still accessible to workflow. In the database, no change occurs.
    2. Executes this Run Process command to insert an empty row in the Team Members table on-screen:
      PERFORM-ACTION-TABLE-ADD-ROWTeamMembersTableFieldID1
      On-screen and in memory, the new row becomes row index 1 (currently empty). In the database, no change occurs.
      For information about this Run Process command, see the Using-Run-Process-and-PROCESS-commands.
    3. Performs a Set Fields action to copy data from row 6 in the Available Employees table to row 1 (currently empty) in the Team Members table on-screen.
      For information about the Set Fields action, see Specifying-workflow-actions.
      On-line, the tables now look like this:
      example_153_2_web.GIF

    Row indexes do not change after a PERFORM-ACTION-TABLE-DELETE-ROW action. Thus, after step 2 is performed, no on-screen row in the Available Employees table has the index 6. If you try to delete row 6 again before committing this change to the database, nothing occurs. For information about this Run Process command, see Using-Run-Process-and-PROCESS-commands.

  3. User—Select Bob Burke in the Available Employees table, and click the right arrow button.
    example_153_3_web.GIF
  4. Remedy AR System server—On button click, execute an active link that performs these actions:
    1. Executes this Run Process command to delete row 2 from the Available Employees table:
      PERFORM-ACTION-TABLE-DELETE-ROW AvailableEmployeesTableFieldID2
      2 is the index of the row in memory. Although the row is no longer visible on-screen, it is still accessible to workflow. In the database, no changes occur.
    2. Executes this Run Process command to insert an empty row above row 1 in the Team Members table on-screen:
      PERFORM-ACTION-TABLE-ADD-ROW TeamMembersTableFieldID1
       On-screen and in memory, the new row becomes row index 1 (currently empty), and row 1 (Fred Fairchild) becomes row index 2. In the database, no change occurs.
    3. Performs a Set Fields action to copy data from row 2 in the Available Employees table to row 1 (currently empty) in the Team Members table on-screen.
       On-line, the form now looks like this:
      example_153_4_web.GIF
  5. User—Click OK to save the changes.
  6. Remedy AR System server—On button click, execute these table loop guides to commit the table changes to the database:
    • Table Loop Guide 1 checks the state of each Available Employee table row in memory. For each row marked Deleted (rows 2 and 6 in this example), it calls the server to remove the row from the corresponding table in the database.
    • Table Loop Guide 2 checks the state of each Team Member table row in memory. For each row marked New (rows 1 and 2 in this example), it calls the server to add the row to the corresponding table in the database.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*