PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Prompt package guide

Ask a person for files, a folder, text or a yes/no answer during an attended Run.

Version 2.13.4. Installed versions can differ. Examples are illustrative and not tested.

Jump to actions

Packages

Prerequisites

Cancellation returns an empty List for files, empty Strings for folder and value, and the String No for yes/no.
Check the result before use. View full size

Shared fields

IDEditor fieldType/defaultRequirement/use
promptCaptionPrompt window captionString⁠; default emptyOptional window title for For file and For folder, such as Select sample⁠. Pickers show caption and message together as their title.
windowCaptionPrompt window captionString⁠; default emptyOptional window title for For value, such as Sample reference⁠.
promptWindowCaptionPrompt window captionString⁠; default emptyOptional window title for For yes/no, such as Sample approval⁠.
promptMessagePrompt messageString⁠; default emptyRequired. Instruction or question, in plain text.

Bind result with the editor field Assign the value to a variable, to a variable of the listed type.

Actions

For file (promptForFile)

Ask for one or more existing files; use their paths in later file steps.

Inputs

Uses the shared fields: promptCaption and promptMessage.

Outputs

IDTypeMeaning/binding
resultListList of String full paths. The package does not read the files.

Example

Create the test files samples/invoice.txt and samples/receipt.txt. Set promptCaption=Select sample, promptMessage=Choose the two sample files. Select both files and confirm. Bind result to the List variable selectedFiles.

Expected result

selectedFiles holds two String items with full file paths. Cancel or close returns an empty List. The picker accepts only existing files.

Back to actions

For folder (promptForFolder)

Ask a person to choose one folder for later file steps.

Inputs

Uses the shared fields: promptCaption and promptMessage.

Outputs

IDTypeMeaning/binding
resultStringFull path of the selected folder.

Example

Create samples/export. Set promptCaption=Select sample, promptMessage=Choose the export folder. Choose that folder and confirm. Bind result to the String variable exportFolder.

Expected result

$exportFolder$ is the full path of the selected folder. Cancel or close returns an empty String.

Back to actions

For value (promptForValue)

Ask for text; wait for OK, Cancel, Esc or close.

Inputs

Uses the shared fields: windowCaption and promptMessage.

IDEditor fieldType/defaultRequirement/use
encryptKeystrokeMask keystrokeBoolean⁠; default falseOptional. true shows dots instead of the typed text. The value is still plain text, not a Credential. false shows the text.

Outputs

IDTypeMeaning/binding
resultStringExactly the typed text on OK, otherwise empty.

Example

Set windowCaption=Sample reference, promptMessage=Enter the invoice reference, encryptKeystroke=false. Enter INV-1042 and click OK. Bind result to the String variable reference.

Expected result

$reference$ is INV-1042. Cancel, Esc or close returns an empty String. OK with no text also gives an empty String, so the result cannot tell these cases apart.

Back to actions

For yes/no (promptForYesNo)

Ask a yes/no question; compare the returned text or branch on it.

Inputs

Uses the shared fields: promptWindowCaption and promptMessage.

Outputs

IDTypeMeaning/binding
resultStringText Yes or No (not a Boolean). Compare against those exact words.

Example

Set promptWindowCaption=Sample approval, promptMessage=Continue with the sample export?. Click Yes. Bind result to the String variable approval.

Expected result

$approval$ is the exact String Yes. No, Esc or closing the window returns the exact String No.

Back to actions