PIC_SetPictureCharacter

Defines up to 10 custom picture strings (0-9) that you can reference from the PIC_ApplyPictureString action.

Syntax

bool PIC_SetPictureCharacter (StrParam)

Parameters

Two comma-separated parameters.
  1. The picture string identifier. The value must be between 0 through 9.
  2. A string of characters to associate with the picture string identifier (the first parameter).
Smart parameters are supported.

Returns

False, if the parameter input is invalid. Otherwise, True.

Level

Any level.

Details

Configures application-specific picture strings.

In addition to the predefined character strings, custom picture strings can be configured. The picture string values 0 - 9 can be configured to allow validations that are not covered by the predefined settings.

It is possible to configure your verify panel edit control to restrict keyboard entry that is based on picture strings when you use the PictureString field variable. Only predefined picture strings work with the edit control. Any custom picture strings that are created by PIC_SetPictureCharacater action do not cause the edit control to restrict user input.

Examples

This example creates custom picture strings for 0, 1 and 2. They are then used to provide tighter control on the allowed input. "0N21N2NN" format matches a typical 6-digit date specification like "01/07/67".

PIC_SetPictureCharacter("0,01")
PIC_SetPictureCharacter("1,0123")
PIC_SetPictureCharacter("2,-./")
PIC_ApplyPictureString("0N21N2NN")

This example is the same except that the picture string is set up in the PictureString variable in Datacap Studio, so it is not seen here.

PIC_SetPictureCharacter("0,01")
PIC_SetPictureCharacter("1,0123")
PIC_SetPictureCharacter("2,-./")
PIC_ValidateField()