Skip to main content

1E SDK

Interaction.ShowQuestion

Method

ShowQuestion

Module

Interaction

Library

Core

Action

Display a pop-up question to one or more user sessions.

The pop-up includes a title, a description and positive and negative choice buttons.

Parameters

Async (boolean): Whether to run the method synchronously or asynchronously.

In synchronous mode, the method will return a table of results once all user sessions have responded or have timed out.

In asynchronous mode, the method returns immediately and results will appear as events as user sessions respond or timeout.

Description (string): Description text that will appear when the pop-up question is displayed.

NegativeChoice (string, optional, default "No"): Text for the negative choice button.

PositiveChoice (string, optional, default "Yes"): Text for the positive choice button.

TimeoutSeconds (integer, optional, default 60): The number of seconds before the question will timeout.

Minimum 30 seconds, maximum 900 seconds.

Title (string): Title text that will appear when the pop-up question is displayed.

Topic (string): In asynchronous mode, the name of the event that will be raised when a user response is obtained.

In synchronous mode, Topic is not relevant and should not be supplied.

UserName (string, optional): Username of the session to which this pop-up question should be directed.

If Username is not supplied then the pop-up question will be directed at all active user sessions.

Return values

Response (string): Text of the button selected by the user.

ResponseTimeSeconds (integer): Number of elapsed seconds before the user responded or before the request timed out.

ResponseType (string): Indicates whether the user responded or whether the user failed to respond before the pop-up question timed out.

ResponseValue (boolean): true if the positive choice was selected else false for the negative choice.

SessionId (integer): Id of the session associated with this question response.

UserName (string): Username of the logon session associated with this question response.

Example

// Synchronous question to a single user session.
Interaction.ShowQuestion(Async:false, Description:"Are you happy with your machine performance?",
 NegativeChoice:"No, not really", PositiveChoice:"Yes, thanks", Title:"System performance", 
UserName:"acme\\development");

// Asynchronous question to all user sessions on this device.
Interaction.ShowQuestion(Async:true, Description:"Are you happy with the network speed?", 
Title:"network performance", Topic:"Network question");

Platforms

  • Windows

Notes