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: Continue reading

August 10, 2009 Posted by | 2. Datawindows, Uncategorized | , , , , , , | 1 Comment

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.

Continue reading

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

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.

Continue reading

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

Datawindow Column Properties


The Dialog box

Continue reading

December 10, 2008 Posted by | 2. Datawindows, Datawindow Painter, Expressions, Modify and Describe | , , , , , , , , | Leave a comment

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.

Continue reading

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

Data Model


This is the data model and data for examples.

Continue reading

November 16, 2008 Posted by | Drop Down Data Window (DDDW) | Leave a comment

Update Status Flags


ItemStatus actually holds two pieces of information at once:

  • New/Not New
  • Modified/Not Modified

Continue reading

June 7, 2008 Posted by | Datawindow PowerScript | , , , , , , | 1 Comment

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

Continue reading

May 29, 2008 Posted by | DataWindow Control | , , , , , | 1 Comment

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

Continue reading

May 29, 2008 Posted by | DataWindow Control | , , , , , , , , | Leave a comment