A colleague asked me if this was possible. My Processbook knowledge is a little rusty (remember Windows 3.1?), so I'm asking here. This is for v18.104.22.168 of Processbook.
He wants to determine how a display was opened (which button got clicked).
Here's what he's trying to do. We had a display showing general information about one process site, and a single trend. Call it site1.pdi. At some point, this display was modified to handle a second site. The general information for the 2nd site was added to the display, then a copy was made (site2.pdi) and the tags in the single trend were replaced with those for site2. Typically, users start with a main.pdi that covers all sites, then click on a button (site1, site2) to bring up the books for that site. These sub-displays then have links to either site1.pdi, or site2.pdi.
We are going to have a 3rd site, so he's added the general information for that site to the display, which is how the clients want it. Rather than maintain 3 displays with quite a bit of duplicated information, he'd like to have one display (site.pdi) for all 3 sites, that has 3 trends (one for each site), then make the appropriate trend visible based on which button they clicked on.
From what I've seen on here, it looks like ModuleContext and Aliases may be the way to go. We haven't used those before, so there could be a bit of a learning curve. Is there a simpler way to achieve what he's trying to do? He was hoping he could do something like this:
Private Sub Display_Open()
If(ProcessBookMagic says site1) Then
trend1.Visible = True
ElseIf(ProcessBookMagic says site2) Then
trend2.Visible = True
trend3.Visible = True