Previous Topic

Next Topic

Book Contents

Book Index

List Tutorial: Save Preferred List Selections

This tutorial will show you how to save your preferred selections for a List, by recording and saving a MaxBasic script to set the selection preferences. You do not need to know how to code to do this.

  1. Open the list to set preferences for. For example, for the AR Customer List, go to Maintain > Accounts Receivable > Customer List.
  2. Click Record Script (Alt+F1) on the main Accredo toolbar to start recording the script. The record icon will change to the icon, to show it is recording your actions.
  3. Make your selections in the list. For example in the AR Customer List, you may want to select a particular Customer Group and / or a Sales Area.
  4. Click Select Customers (F9) to apply your selections.
  5. Click Stop Recording (Alt+F1) on the main toolbar. The script will appear in the Script Editor window.
  6. To test the script, close the List form, then re-open the list.
  7. In the Script Editor, click Run (Alt+R). You will be asked if you want to save the script, click No, as you don't need to save it yet.
  8. Check that your selections have been correctly applied in the List form.
  9. If you are happy with the selections, save the Script. In the Script Editor, click ReportSaveToDisk Save (Ctrl+S).
  10. Enter a name for your script, for example ARCustomerSelections. Click Save.

Opening the Modified List by Default

You can create a script event to automatically open the list with your preferred selections by default.

  1. In the List form, right-click under the toolbar icons, then select Script ViewerAdd Script Event. The Script Events form will open.
  2. The Module and Class of the list form are already selected. Set the Type to OnOpen. This means the script will run automatically when the form is opened.
  3. Click EditZoom Select File (F2) under the Script Name, and select the script file you saved in Step 10.
  4. Click Save (F9). Close the Script Events window.

Now when you open the List again, your preferred selections will be automatically applied.

Creating a Shortcut to the List Selections

You may want to be able to make your list selections by clicking a button on the toolbar. This also allows you to have multiple list selections.

  1. On the list, right-click then select ScriptAddShortcut Add Shortcut.
  2. The Shortcut Type will default to Script. In the Script Name, click EditZoom Select File (F2) and select the script file you saved in Step 10 above.
  3. You can assign a shortcut key for the button, and you can change the button glyph.
  4. Click Save (F9).

The button will be added to your list toolbar. You can create multiple list selection files, then add them all to your toolbar, to be able to quickly make list selections.

Assigning a List Selection to a Role

You may want to create a list selection that can be used by people in a particular role. First create a shortcut button as above.

  1. Right-click on the Shortcut, then select Edit Shortcut.
  2. Go to the User tab.
  3. In the User column, click to select the Role required.
  4. Click Save (F9).

Now only Users in the selected Role will be able to access the shortcut.

Adding a Shortcut to the Navigator and Global Toolbar

You can add a shortcut to your list with selections to the navigator.

  1. From the Global Toolbar, select ScriptAddShortcut Add Shortcut.
  2. The Script Shortcut Editor will open, with Shortcut Type defaulting to Script. In the Script Name, click EditZoom Select File (F2) and select the script file you saved in Step 10 above.
  3. You can assign a shortcut key for the button, and you can change the button glyph.
  4. By default, Available on Toolbar will be Selected, with the Toolbar Name Global. This will add the shortcut to the Global Toolbar.
  5. To add the shortcut to the Navigator, select Available in Navigator. Set the location in the Navigator.
  6. Click Save (F9).

The button will be added to your Global toolbar and the Navigator.