1. Ian Wells
  2. PowerBuilder
  3. Thursday, 3 August 2017 17:02 PM UTC

Is this forum just for PB 2017 questions or can I ask a PFC question?

 

i have created a master detail relationship with multiple DWs using the PFC linkage service. The master is on the top part of the window and the details DWs are on separate tabs in a tab container UO in the bottom half of the screen. I have registered all the child DWs with the Master DW and it all work well and retrieves all of the child DWs when I retrieve the Parent. On one of the child  tabs there is a list of detail rows (from a child table), you can add a row by pressing a button, filling in the required data and the pressing close. A save is triggered by the response window and a new child record is created in the table. What event do I trigger to re-retrieve the DW on the tab to refresh the list of child records. I've looked through the various PFC info sites and can't find the answer. 

 

Thanks for for your help, and I apologize if this is not the right forum for this type of question. 

Accepted Answer
Ashutosh Varshney Accepted Answer Pending Moderation
  1. Thursday, 3 August 2017 17:51 PM UTC
  2. PowerBuilder
  3. # Permalink

There are many ways to do that. The simplest is to call the retrieve in the close event of your response window. Something like this:

responsewindow:close

If IsValid (mainWindow) Then mainWindow.dw_1.Event pfc_Retrieve

 

Comment
  1. Ashutosh Varshney
  2. Friday, 4 August 2017 13:37 PM UTC
That is a better option. Retrieve in the same event after your response has closed with a success. You can call inv_Linkage.of_RetrieveDetails() for your detail dw. This does a few more extra things which you might not want - but try it. If that does not work then manually get the master key values and retrieve the detail dw.



HTH

  1. Helpful
  1. Ian Wells
  2. Saturday, 5 August 2017 03:14 AM UTC
Thanks. I'll give it a try. 

  1. Helpful
  1. Olan Knight
  2. Tuesday, 8 August 2017 13:35 PM UTC
If your edits are in the response window, I would suggest that your SAVE occur in the  response window BEFORE closing it.



The way to do  that is to POST the call to your dw.EVENT pfc_retrieve () event. Please ensure that any errors are caught in that event and any notifications to the user are handled at the bottom of the event.



When you close the response window you are right back to the calling event in the master window, and you can pass back a status code if further processing is required as a result of the activity in the response window.



 



Good Luck,



Olan

  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.