Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Prompting for retrieval criteria in a DataWindow object – PB Docs 150 – PowerBuilder Library

Prompting for retrieval criteria in a DataWindow object – PB Docs 150

Prompting for retrieval criteria in a DataWindow object

You can define your DataWindow object so that it always prompts for
retrieval criteria just before it retrieves data. PowerBuilder allows
you to prompt for criteria when retrieving data for a DataWindow
control, but not for a DataStore object.

proc.png To prompt for retrieval criteria in a DataWindow object:

  1. If the Column Specifications view is not
    already displayed, select View>Column Specifications from
    the menu bar.

    In the default layout for the DataWindow painter, the Column Specifications
    view displays in a stacked pane under the Properties view. All columns
    defined for the DataWindow object are listed in the view.

  2. Select the Prompt check box next to each column
    for which you want to specify retrieval criteria at runtime.

When you specify prompting for criteria, PowerBuilder displays
the Specify Retrieval dialog box just before a retrieval is to be
done. (It is the last thing that happens before the SQLPreview event.)

Each column you selected in the Column Specification view
displays in the grid. Users can specify criteria here exactly as
in the grid in the Quick Select dialog box. Criteria specified here
are added to the WHERE clause for the SQL SELECT statement
defined for the DataWindow object.

note.png Testing in PowerBuilder

You can test the prompting for criteria by retrieving data
in the Preview view of the DataWindow object.

Using edit styles

If a column uses a code table or the RadioButton, CheckBox,
or DropDownListBox edit style, an arrow displays in the column header
and users can select a value from a drop-down list when specifying
criteria:

dwen30.gif

If you do not want the drop-down list used for a column for
specifying retrieval criteria to display, select the Override Edit
check box on the General page of the column’s Properties
view.

Forcing the entry of criteria

If you have specified prompting for criteria for a column,
you can force the entry of criteria for the column by selecting
the Equality Required check box on the Behavior page of the column’s
Properties view. PowerBuilder underlines the column header in the
grid during prompting. Selection criteria for the specified column
must be entered, and the = operator
must be used.

For more information

The section “Using Quick Select” describes in detail how you and your
users can specify selection criteria in the grid.

The chapter on dynamic DataWindow objects in the DataWindow Programmers
Guide
describes how to write code to allow users to specify retrieval
criteria at runtime.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x