EE - Forum Styles
fo

Batch prompt pop up configuration using script

Hi

I want to set filtering of Batch unacknowledged prompts based on Units. Can anybody help me how we can set the option shown in attachment using script? This option will be set in edit mode of graphics.

This will be a dynamo. Unit name will be available on dynamo form. 


Thanks in advance. Quick response is highly appreciated.

Thanks and BR

Bhushan

  • In reply to Mantri_Bhushan:

    We use this current context all the time, you just add the suggested logic below the DVBCtrlPromptsListX.ConnectControl logic in the DVBCtrlPromptsListX_OnConnectedToAccess() Event

        DVBCtrlPromptsListX.CurrentContext = ps_UnitName4.CurrentValue.Caption

    Then we also have connection logic on the button to show the prompts list to connect again in case it isn't:

        If DVBCtrlPromptsListX.ConnectionState <> "CONNECTED" Then
            On Error Resume Next 'Resume if batch executive is not running
            DVBCtrlPromptsListX.ConnectControl
        End If

        If DVBCtrlPromptsListX.ConnectionState = "CONNECTED" Then
            DVBCtrlPromptsListX.CurrentContext = ps_UnitName4.CurrentValue
            If DVBCtrlPromptsListX.ExecutiveNode = "" Then
                Dim BatchExecutive As String
                BatchExecutive = frsReadValue("DVSYS.THISUSER/BATCH_SERVER.A_CV")
                If BatchExecutive <> "" Then
                    DVBCtrlPromptsListX.DisconnectControl
                    DVBCtrlPromptsListX.ExecutiveNode = BatchExecutive
                    DVBCtrlPromptsListX.ConnectControl (30000)
                Else
                    MsgBox "Batch Executive Not Defined for this NODE"
                End If
            End If
        Else
            MsgBox "Communication with Batch Executive Server failed.", vbCritical
        End If


    where DVBCtrlPromptsListX is the ActiveX Prompts object name and ps_UnitName4 is named in above comment