Criteria.property

Description

Settings for the Prompt for Criteria dialog box. When Prompt for Criteria is enabled, PowerBuilder prompts the user to specify criteria for retrieving data whenever the Retrieve method is called. Note that the Required property also affects query mode.

Syntax

PowerBuilder dot notation:

dw_control.Object.columnname.Criteria.property

Describe and Modify argument:

"columnname.Criteria.property { = value }"

Parameter

Description

columnname

The name of the column for which you want to get or set Prompt for Criteria properties.

property

A property for the Prompt for Criteria dialog box. Properties and their settings are listed in the table below.

value

A Yes or No value to be assigned to the property. For Criteria properties, value cannot be a DataWindow expression.

Property for Criteria

Value

Dialog

Whether Prompt for Criteria is on for columnname.

Values are:

  • Yes – Include columnname in the Prompt for Criteria dialog box.

  • No – (Default) Do not include columnname in the Prompt for Criteria dialog box.

If the Dialog property is Yes for at least one column in the DataWindow, then PowerBuilder displays the Prompt for Criteria dialog box when the Retrieve method is called.

Painter: Column Specifications view, Prompt check box.

Override_Edit

Whether the user must enter data in the Prompt for Criteria dialog box according to the edit style defined for the column in the DataWindow object or be allowed to enter any specifications in a standard edit control.

Values are:

  • Yes – Allow the user to override the column’s edit style and enter data in a standard edit control.

  • No – (Default) Constrain the user to the edit style for the column.

Painter: Properties view, General tab, Override Edit option.

Required

Whether the user is restricted to the equality operator (=) when specifying criteria in query mode and in the Prompt for Criteria dialog box.

Values are:

  • Yes – Require the user to use the equality operator only.

  • No – (Default) Allow the user to use any relational operator, including =, <>, <, >, >=, and <=.

Painter: Properties view, General tab, Equality Required option.

Usage


In the painter

Set the values using the menus and Properties view as described in the table above.

Examples

Example 1

string setting

setting = dw1.Object.empname.Criteria.Dialog

Example 2

dw1.Object.empname.Criteria.Dialog= "Yes"

Example 3

setting = dw1.Describe("empname.Criteria.Dialog")

dw1.Modify("empname.Criteria.Dialog=Yes")

dw1.Modify("empname.Criteria.Override_Edit=Yes")

dw1.Modify("empname.Criteria.Required=No")

IF dw1.Describe("empname.Edit.Style") = "dddw" THEN

dw1.Modify("empname.Criteria.Override_Edit=Yes")

END IF