Sunday, 3 September 2017

Adding a bit of Excel to tabular forms

When speaking to users they often ask me whether the editing of data can be like Excel. Using tabular forms is a long way from using Excel. It is hard to operate the tabular form just with the keyboard and copying of values needs to be done in a number of keystrokes.

With this in my mind I created a JavaScript function to perform a (single) copyDown action. The value of an item is copied to the item below and the focus is set to that item. When this can be executed using a key(combination) the user is able to do a fast copy down action.
After creating this function I realized it also can be used to move up and down in the tabular form using the arrow keys. And I decided to create a Plug-In around it.



The Plug-In can be called from a Page Load dynamic action. No settings are needed.
The actions will execute on any text, date, and select item in a tabular form. Checkboxes are not yet supported.
The available function keys are:

  • [Up] move up to previous row
  • [Down] move down to next row
  • [Ctrl] + [Down] copy content of current cell to cell below and set focus to this cell
  • [Ctrl] + [Up] copy content of current cell to cell above and set focus to this cell
  • [Ctrl] + [Shift] + [C] copy content of current cell to cell below and set focus to this cell ( needed for Select items because they have another function for [Down] )
I could have included the [Right] and [Left] arrow keys but then the editing of the cell content would be affected. These keys cannot be used anymore to navigate within the content. So the keys [Tab] and [Shift][Tab] can be used to go to the next and previous item in the row.

I think many of you can make your users even happier with their Apex application when implementing this Plug-In in your application.

You can see and experience the Plug-In at this demo page: http://www.speech2form.com/ords/f?p=141:copydown

As always this plugin can be downloaded from apex.world.

One last question: does anyone know how to access the state of checkboxes in an Universal Theme tabular form?

Happy Apexing



4 comments:

M.Yasir Ali Shah said...

Hi Dick,
I have tested this plugin in your application http://www.speech2form.com/ords/f?p=141:COPYDOWN
the following are my observations:
You shouldn't use Ctrl + Shift + C
As it's one of the default shortcuts in chrome developer tools.
refer to https://developers.google.com/web/tools/chrome-devtools/shortcuts
and in firefox it is element inspector
https://getfirebug.com/wiki/index.php/Keyboard_and_Mouse_Shortcuts

However, it can be disabled. just search google how to in firefox and chrome

I think for safari and IE its good. still you need to study the shortcuts for the most popular browsers and set a shortcut that's easy to remember , use and does not conflict.

Dick Dral said...

Hi Yasir,

thanks for your comment. Do you have any suggestions for a key combination that does not conflict with existing usage?

Thanks,
Dick

Praveen Gopal said...

This plugin supports Interactive Grid?

Dick Dral said...

The plugin does not support the IG.
In the new version of APEX the IG has copy-down functionality.

Thanks,
Dick