/ Forums / Advansys Formativ / Creating Solutions with Formativ / Interact with Portal with Form Open / Reply To: Interact with Portal with Form Open

#8100
Support 3
Participant

    “frmMain.Show” method will show the dialog and continue to the next line. However, the applet execute as model thus you will not able to swith back to the window (i.e. GroupWise client/portal) until the applet complete.

    Does your application display the “Review Process Report” form when you create the portal?

    Another thought, you could add a “Print” button to your report html then your applet display the portal and exit. Your user view the portal (i.e. portal will have the focus) and when they ready to print then they can press the Print button which will execute your applet again to show the “Review Process Report” form.

    You will need to follow the steps below to call the applet from the portal.

    Step 1: Add the button html to the Portal html

     
    <INPUT TYPE="HIDDEN" NAME="formativapplet" VALUE="c:Documents and Settingsuser-nameMy DocumentsAdvansysFormativAppletsmyapplet.vbf"><INPUT TYPE="SUBMIT" NAME="printBtn" VALUE="Print">
    

    Applet code to create the button html

      iBtnHtml = " <INPUT TYPE=""HIDDEN"" NAME=""formativapplet"" VALUE=""" & utilities.currentappletname & """><INPUT TYPE=""SUBMIT"" NAME=""printBtn"" VALUE=""Print"">"
      msgbox iBtnHtml  
    

    Step 2: Make sure the Portal.RunApplets is set to true

      
       oPortal.ID = "test"
       oPortal.TabCaption = "CQQ"
       oPortal.RunApplets = TRUE
    

    Step 3: When the Print button pressed from the Portal and the applet execute then you will need to identify whether the applet executed by the portal.

    Sub Main(Client, GWEvent)
    
      ' What mode are we being executed in?
      if (GWEvent = "HTML_TRIGGER") then
        ' display the Review Process Report form
      else
        ' Create the portal
      end if
    
    End Sub  
    

    For reference, you can review our cool solution Today View which uses the technique above.

    Hope this helps.

    Regards,
    Advansys support