popupsharingmenu
popupsharingmenu
OPERATION

The popupsharingmenu statement pops up a menu for the toolbar sharing icon.

Parameters

This statement has one parameter:

operation – operation to perform, or empty for popup menu.

Description

This statement pops up a menu for the toolbar sharing icon (it’s used internally by ProVUE for this purpose). It can also be used with a Text Display object to pop-up the sharing menu within a form (see setbannericon to learn how to do this).

To pop-up the menu, use this statement with an empty parameter, like this:

    popupsharingmenu ""

If the parameter is not empty, the pop-up menu will not appear. Instead, Panorama will immediately perform the requested operation, which must be specified from this list: checkconnection, synchronizedata, downloaddata, disconnect, connect, newgeneration.

For example, you could use this code if you wanted to check the database connection as if the user had popped up the menu and picked the Check Server Connection item.

    popupsharingmenu "checkconnection"

You could also use the parameter to make your own custom sharing menu, like this limited menu with only 3 items:

    let connected = dbinfo("connected","")
    let sharingMenu = menu("Sharing","size",11)+
        ?(dbinfo("recordlockid","")=0,
            ?(info("modifiers") contains "option",
                menuitem("Upload Record","IDENTIFIER","uploadrecord","ENABLED",connected),
                menuitem("Lock Record","IDENTIFIER","lockrecord","ENABLED",connected)
            ),
            menuitem("Unlock Record","IDENTIFIER","unlockrecord","ENABLED",connected)
        )+
        menuseparator()+
        menuitem("Check Server Connection","IDENTIFIER","checkconnection")+
        ?(connected,
            menuitem("Disconnect from Server","IDENTIFIER","disconnect"),
            menuitem("Connect to Server","IDENTIFIER","connect")
        )
    local popChoice
    popupclick sharingMenu, "Synchronize Data", popChoice
    if popChoice="" return endif
    operation = info("menuidentifier")
    popupsharingmenu operation

See Also

- Automatic Record Numbering in a Shared Database -- generating unique numbers across multiple users.
- Record Locking and Editing Shared Data -- coordinating data entry across multiple simultaneous users.
- setbannericon -- sets the icon on the right side of the toolbar banner.
- Shared Database Synchronization -- data synchronization across multiple users.
- Sharing Icon & Context Menu -- operation of the sharing icon and pop-up menu (in the toolbar).
- Working with Sharing Disruptions -- dealing with network & power outages, disconnections, and other anomalies.
- Working With Summary Records in a Shared Database -- summary records are not shared between users.

History

Version | Status | Notes
10.2 | New | New in this version.