1. Haakon Langballe
  2. PowerBuilder
  3. Friday, 22 November 2019 13:31 PM UTC

Hi.

In the project I maintain, there is apparently a filed in a data window that is linked with a key to a column in a  different table. I've been struggling to find where this link is defined. The data source is not joining the other table in (as far as I can see).

Where do I find the definition/code for this link and what is it named in Powerbuilder?

 

Thanks

Haakon

Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 22 November 2019 13:39 PM UTC
  2. PowerBuilder
  3. # 1

Your field is either a column in the SQL SELECT result set - or it is a computed field.

  • Result set column => Find the column in Column Properties; then check the definition in the Data Source. It can be an expression like a user-defined function hiding the actual JOIN.
  • Computed field => Select the field; in the [General] properties pane click button named […] next to the Compute Expression. NOTE: This MAY be ca call to a PowerScript GLOBAL function.
  • Otherwise, check in the RetrieveEnd script (or RetrieveRow) for code that explicitly retrieves more data and sets such data in the DataWindow using SetItem or ".object" notation.

HTH /Michael

Comment
There are no comments made yet.
Haakon Langballe Accepted Answer Pending Moderation
  1. Friday, 22 November 2019 14:15 PM UTC
  2. PowerBuilder
  3. # 2

I realized that the control in question is a drop-down listbox.

I guess the drop-down list is populated at a later stage.

In the controls tree I found a datawindow that is canditate for the dd-listbox but I cant find any reference to that in the properties for the ddlb in the original datawindow. Could the list be loaded dynamically? 

Cheers
Haakon

Comment
  1. Michael Kramer
  2. Friday, 22 November 2019 14:29 PM UTC
Sometimes developers choose to create embedded SQL cursor and fetch data explicitly into DDLB instead of defining a "list DW object" and uses that as DDDW. Takes more code and runs slower than DDDW.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.