Schultz’s PowerBuilder Notes

Datawindow Retreive With Large In Clause

Our DBMS limits the number of Items in an “IN Clause” to 255. If you attempt to retrieve with an array of a larger size, the retrieve fails. One method of dealing with this constraint is to create a temp table, populate this with your retrieval arguments, and then have your datastore join to the temp table during the retrieve. Another way is to use a function similar to this: Read more »

August 10, 2009 Posted by rick130 | 2. Datawindows, Uncategorized | , , , , , , | No Comments Yet

Making DW Radio Buttons and Check Boxes look disabled

An effective GUI quickly communicates to the users  how they can interact with the current window.  For most datawindow edit styles, PowerBuilder supplies its developers with the means to visually show if  it is available to accept user input.  Unfortunately, if you are working with an older version of PB,  how to show  a disabled check box or a radio button is a  puzzle.  Here is how I deal with this issue.

Read more »

March 17, 2009 Posted by rick130 | 2. Datawindows, Datawindow PowerScript, Expressions, Modify and Describe | , , , , , , , , , , , | No Comments Yet

Setting the RowStatus

If you have worked with PowerBuilder for a while, you have learned that setting the status of a row is not always a straight forward procedure.  I have created a handy utility which will simplify this process.

Read more »

January 1, 2009 Posted by rick130 | 2. Datawindows, Datawindow PowerScript, Powerscript | , , , , , , , , , , | 4 Comments

Datawindow Column Properties

December 10, 2008 Posted by rick130 | 2. Datawindows, Datawindow Painter, Expressions, Modify and Describe | , , , , , , , , | No Comments Yet

The Ol’ Hidden Items in the Dddw Problem Part II

We all eventually need to build a datawindow where the contents of a drop down list is dependent on the value of another column.

Filtering the available selections in the dddw for the current row is straight forward, just add the necessary filtering script in the RowFocusChanged and ItemChanged events.   (See DDDW Contents Based on the Value of Another Column for more information regarding this. ) But if you have a tabular view, problems may soon become apparent with dependent columns in some rows displaying code values instead of descriptions.

Read more »

November 16, 2008 Posted by rick130 | Drop Down Data Window (DDDW) | , , , , , , , , , , , | 4 Comments

Data Model

This is the data model and data for examples.

Read more »

November 16, 2008 Posted by rick130 | Drop Down Data Window (DDDW) | | No Comments Yet

Update Status Flags

ItemStatus actually holds two pieces of information at once:

  • New/Not New
  • Modified/Not Modified

Read more »

June 7, 2008 Posted by rick130 | Datawindow PowerScript | , , , , , , | No Comments Yet

ItemError Event

Return codes

Return Code

Action

0

Reject the data value and display an error message

1

Reject the data value and do not display a message

2

Accept the data value

3

Reject the data value but let the focus change

Read more »

May 29, 2008 Posted by rick130 | DataWindow Control | , , , , , | No Comments Yet

ItemChanged Event

Return codes

Return Code

Action

0

Accept the data value

1

Reject the data value

2

Reject the data value but let the focus change

Read more »

May 29, 2008 Posted by rick130 | DataWindow Control | , , , , , , , , | No Comments Yet