1. Arthi Ramesh
  2. PowerBuilder
  3. Thursday, 27 June 2024 09:12 AM UTC

I am using Powerbuilder 2022. I have a requirement as follows.

 

Consider 2 windows Window A and Window B. 

In Window A, i have retrieved a person detail and it always will have only one row. 

Now i open Window B and when I click a button, I have to get the person detail from Window A and i have to compare with Window B person detail.

How to achieve this?

Note : Window A and B are opened individually by the user

Your suggestions would be of great help.

 

Thanks & Regards,

Arthi

René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 27 June 2024 09:48 AM UTC
  2. PowerBuilder
  3. # 1

Hi Arthi,

there are several options.

Short answer: You need a variable of the window you want access.

 

If you open the window like this

open (w_window_a)

it is very easy. You can just use the windowname as name of a window variable and access controls in it.

w_window_a.dw_1.RowCount()

 

If you don't open the window this way, you can't access it via window name! You need a variable for the window.

One example:

w_window_a lw_a_window_a

open (lw_a_window_a)

// this way you can open more than one w_window_a.
// lw_a_window_a is in this case a local variable for one of the opened windows
// In your case you need a global or some kind of instance variable. But it works the same.

// to access the window
lw_a_window_a.dw_1.RowCount()

 

If your window is a sheet in a frame you can use frame window functions to find the sheet you want.

 

HTH,

René

 

Comment
There are no comments made yet.
Arthi Ramesh Accepted Answer Pending Moderation
  1. Thursday, 27 June 2024 10:21 AM UTC
  2. PowerBuilder
  3. # 2

Hi,

Thanks for the response.

 

The window A and window B are two different window which user can independently open whenever they want. During a button click process in Window B i have to check if Window A is open and in that window a DataWindow is retrieved. I should be able to access the data from the Data Window present in Window A.

 

The window A is a sheet. So is there any way we can achieve this?

Comment
  1. René Ullrich
  2. Thursday, 27 June 2024 10:23 AM UTC
Is with sheets the same as with other windows. How do you open the sheet?
  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.