Sorry if the title is confusing, but so is the topic.
I have a one to many relationship between two datawindows so that when you click on a row in dw_1 it shows multiple rows in dw_2. I have a dwc field in dw_2 that has two arguments, one of which is dependant on the information that comes back when dw_2 is retrieved. So I can't figure out how dynamically retrieve the data window for each row.
Essentially I am trying to show the number of notes that have been created for a particular provider as follows:
provider_1 provider_name dwc_number_of_notes_for_provider (e.g. 6)
provider_2 provider_name dwc_number_of_notes_for_provider (e.g. 0)
provider_3 provider_name dwc_number_of_notes_for_provider (e.g. 4)
Here is the code, but I cannot figure out where to put it to make it work:
// DWC to get number of notes for provider
rownbr3 = tab_1.tabpage_1.dw_2.getrow()
sp_id3 = getitemnumber(rownbr3, "service_provider_sp_id")
// DataWindowChild dwc_provider_notes
// rtncode3 = tab_1.tabpage_1.dw_2.GetChild('sp_company_notes', dwc_provider_notes)
rtncode3 = tab_1.tabpage_1.dw_2.GetChild('compute_1', dwc_provider_notes)
messagebox("Return code is ", string(rtncode3))
//***MAY NEED MORE HERE
iii_row3 = dwc_provider_notes.insertrow(0)
dwcrows3 = dwc_provider_notes.Retrieve(gv_effort_id,sp_id3)
messagebox("Return rows are ", string(dwcrows3))
Perhaps there is an alternate way to do it. Essentially, I just want a field to display a rowcount for table b that is based on information that in the same row.