Kore Tech Tip
How to Display Account Name in wIntegrate Title Bar
Tip
#1014

Setting wIntegrate Title Bar to display account information

If you use the Classic DataFlo menus and you or your users log into multiple DataFlo accounts (DEV-DATAFLO, PILOT, etc.), or if you are running in a Multi-Plant environment, then you may have run into the problem of entering data into the wrong account. While the default Menu setup shows the Account Name, you have no indication of which account you are in while you are using a data entry screen. To help minimize this problem, here's a little tip that explains how to change the wIntegrate Title Bar to display the Account Name, and the Plant ID (if your are running in a Multi-Plant environment).

The standard DataFlo program SYS.35 (part of the Preview product) has the function of displaying the Welcome message, and this is the place where you should put any required additional initialization code. We have added various functions to this program for our clients, including logging off idle users after a user-specific timeout, enforcing the number of sessions a particular user is allowed to have open, and preventing the wIntegrate session from being closed without properly logging out of DataFlo.

To change the wIntegrate Title Bar, edit SYS.35 and add the following code immediately after the $INCLUDE PVINCLUDES COMMON.LINES instruction:
* Revision to set wIntegrate Title Bar
$INCLUDE PVINCLUDES CC.EQUATES
$INCLUDE PVINCLUDES ACCTDEF.EQUATES
IF CCTBL = "GUI.WINTEGRATE" THEN
  CALL HW.OPEN("VOC",F.MD,ISA.OPEN,1)
  READ ADEF FROM F.MD,"$ACCTDEF$" THEN
    TITLE.TEXT = "DataFlo - "
    IF ADEF # '' THEN
      IF ADEF # '' THEN
        TITLE.TEXT = "Plant ":ADEF:" - "
      END
      TITLE.TEXT = TITLE.TEXT:ADEF
    END ELSE
      ACCT.PATH = FIELD(ADEF,"/",DCOUNT(ADEF,"/"))
      TITLE.TEXT = TITLE.TEXT:ACCT.PATH
    END
    CALL WIN.TITLE("DataFlo")
    HOLD.TEXT = TITLE.TEXT
    SESSION.CTR = 1
    FOUND = 1
    LOOP
      CALL WIN.TASK(TITLE.TEXT,FOUND)
    UNTIL NOT(FOUND) DO
      SESSION.CTR = SESSION.CTR + 1
      TITLE.TEXT = HOLD.TEXT:" - Session ":SESSION.CTR
    REPEAT
    CALL WIN.TITLE(TITLE.TEXT)
  END
END
* End of wIntegrate Title Bar Revision	
This code first checks to make sure that you are logged in using the wIntegrate driver. It then reads the Account Definition, and sets the first part of the Title either to “DataFlo - AccountName” (for non MultiPlant) or to “Plant 99 - AccountDescription” (for Multi-Plant). It then tests to make sure that there is not already another wIntegrate session open with the same title bar. If there is, it appends “ - Session 2” (or the appropriate session number) until there are no duplicates. Finally, it sets the Title Bar and is done.

If you would like to know more about the other functionality available at user login time, please contact us and we will be happy to assist.

DataFlo is a product, copyright, and trademark of Epicor Corporation
 
 
 
Our technical tips are provided to help you find new or easier ways to solve some of your technical challenges or to show you a new technique. We hope you find them useful. Please contact us if you would like to share one of your Tech Tips or need help solving a technical challenge. We would be happy to help you.