---
url: /flow/guide/scripting-reference/functions/logging/questionyn.md
---

# QuestionYN

## Declaration

`Function QuestionYN( aMessage : string; HelpID : LongInt) : TQuestionResult`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
If QuestionYN('Do you want to use GST with this transaction?',0)=mrYes then
Value := TaxAmount(100,12.5)
else
Value := 100;
end;
```

## Description

Asks the user a question and waits for these response to be either Yes or No. HelpId should always be set to 0.

::: danger
You should NEVER use this function in a map that will be executed by FlowService. This requires the users response so will lock FlowService as it is unable to get user input.
:::

How this message is displayed depends on what application is executing the script. If executed under Flow this message will show to screen - the user needs to answer Yes or No to the question to continue processing.
