1. Themba Mikashi Cibi
  2. PowerBuilder
  3. Thursday, 28 June 2018 13:55 PM UTC

Good day

How can I retrieve data from one window to another like data that was filled front person to be retrieve by second person and edit is admin and nurse and create report using grid that can combined three tables to make one table which is report I'm struggling to get the code for it please assist. 

Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 28 June 2018 14:45 PM UTC
  2. PowerBuilder
  3. # 1

Your question is very vague and going to be hard to answer, but I'll try to give you some advice based on what you posted.  First off, getting data from one window to another is done a few different ways.  the most common is via the Message object.  If you are opening Window_2 from Window_1 using code inside Window_1, you can do something like OpenWithParm(window_2, your_parameter).  Your_parameter can be a string, number, blob, or even an object that contains data.  Another way to do this is to get a reference to window_2, and then call an event or function on window_2, passing whatever you need for window_2.

 

As for your report issue, it sounds like you just need to join the 3 tables using SQL to produce the report, but you weren't very specific, so it's hard to say.

 

Let me know if you want more info on those techniques.  You could always use Global Variables too, but that's generally frowned upon unless absolutely necessary or used throughout the whole app.

 

Kevin

Comment
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Thursday, 28 June 2018 16:14 PM UTC
  2. PowerBuilder
  3. # 2

Hi

Combining data from 3 tables you would do this at the DB layer, is it a Union that you are looking for?

Alternatively you read your 3 tables in the PB code looping through the rows and inserting the processed data into your Grid DataWindow.

A bit more details of your exact business problem would really help.

Regards

David

Comment
There are no comments made yet.
Kim Berghall Accepted Answer Pending Moderation
  1. Thursday, 28 June 2018 18:47 PM UTC
  2. PowerBuilder
  3. # 3

The first user would save the data to the database, then the second or other user(s) can retrieve that data. Keep it simple.

Comment
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.