← servoy magazine

[Showcase] Worxinfo II: Small Business Solution

  • Showcase

by Graham Greensall
Worxinfo Ltd

[image unavailable: Wx2_projectdetail_1] Worxinfo II is a Servoy solution that looks after the core tasks facing most small businesses: handling customers, tasks and to-do lists, producing quotes, job control and profitability, creating sales invoices and correspondence.

It has been developed to fulfil three functions:  a working system to run the Worxinfo business, a standalone runtime solution for retail sale, and a Servoy showcase for potential clients.

INTERFACE

One of the primary aims was to provide users with an clean interface that provided the maximum amount of useful information with minimal clicking and jumping around to different layouts. Servoy's hidden tab panels are ideal for this and provide Developers with tremendous flexibility to produce an interface that does not look like a traditional database screen.

The Worxinfo II display comprises three columns of hidden tab panels: a Custom Controller on the left has two tab panels providing all File/Table, Layout and Action buttons, the central tab panel shows up to six views of the data, and the right-hand column contains two list views displaying all Tasks/Activities associated with the current Contact or the last Search results. A composite picture of the layout structure is attached.

EASY EXTENSION

Once customers have spent some time with the runtime version it is hoped they will come back for a wider ranging, tailored system so that Worxinfo can sell development time and Servoy BV enjoy increased licence sales.

The Custom Controller structure allows additional Tables, View and Actions to be added with minimum coding effort. Table names and Views are held in their own Table (see screenshot) so additional items can be added in moments.

The display table has a single OnAction script that checks if the line clicked is a Table or View using the menuStatus field:  if it's a Table the associated Views are set to Active, or if a View is clicked the Tab number is extracted from the menuSort field. The List view was chosen rather than Table so that the black line 'feature' that appears at left end of the selected line could be incorporated into the interface design and remove the need to code a background highlight.

//    menuSelectv2    =================================
//    use left/1 char of button clicked to set new file
//    =================================================

globals.gMenuFileCurr = utils.stringLeft(forms.menu__FilesViews.menusort, 1)

var x = forms.menu__FilesViews.menusort.length
if ( x == 1 )        //    button selected is a FILE
    {
    //    load & sort all records on menu_tabs layout (no relationship)
    forms.menu_wx.controller.loadAllRecords()
    forms.menu_wx.sortMenuSort_asc();
    
    //    loop records setting new file actions to active
    for ( globals.gX = 0 ; globals.gX <= forms.menu_wx.controller.getMaxRecordIndex() ; globals.gX++ )
    {    
        forms.menu_wx.controller.setSelectedIndex(globals.gX+ 1);
    
        if ( forms.menu_wx.menutype == 'tab' )
        {
            if ( utils.stringLeft(forms.menu_wx.menusort, 1) == globals.gMenuFileCurr )
            {    forms.menu_wx.menustatus = 'active'            }
            else
            {    forms.menu_wx.menustatus = 'hidden'                }
        
        }
    }
    
    //    re-set relationship then sort list
    globals.gMenuActive == 'active'
    forms.menu__FilesViews.sort_MenuSort_asc();
    globals.gMenuTabNo = 1
    }
else                //    button selected is a VIEW
    {
    globals.gMenuTabNo = utils.stringToNumber(forms.menu__FilesViews.menusort)
    }
    
if ( globals.gMenuFileCurr == 'a' )    {forms.home__.setupHome();}
if ( globals.gMenuFileCurr == 'b' )    {forms.contacts__.setupContacts()}    
if ( globals.gMenuFileCurr == 'c' )    {forms.projects__.setupProjects();}
if ( globals.gMenuFileCurr == 'd' )    {forms.corres__.setupCorres();}    
if ( globals.gMenuFileCurr == 'e' )    {forms.financial__.setupFinancial();}
if ( globals.gMenuFileCurr == 'f' )    {forms.essential__.setup_essential();}

The last menu item 'Essential' links to a set of three screens I added in less than 30 minutes just before meeting a prospective client. Essential's logo and corporate colours were added to the standard layouts, and they were able to search and view their own products during the meeting.    Naturally they were suitably impressed - but I didn't tell them how easy it was otherwise they would expect the whole project to be completed in a couple of days....

Screen shots

[image unavailable: Wx2_contactnotes]

[image unavailable: Wx2_contactlayoutcomposite]

[image unavailable: Wx2_menulist]

Comments (3)

Thomas Hertzler
Very inspirational! This is what the example solution should look like.
Tara Ingram Hudson
This is excellent. Very clean interface. Thank you for sharing this! A question, am I right that since "hidden" or "active" is entered into the table as data when the user clicks, then this desing only works for a single user?
Graham Greensall
Thanks for the compliments and congratulations on being the first to spot the 'deliberate' mistake. The system was built to learn Servoy and aimed as standalone runtime so it just about works OK. However, have since moved on to storing all File & Action details as Globals with values set in opening methods since this will work multi-user and avoids problems when updating solutions. Regards Graham