I have one thing (School_TH) with 2 properties of infotable type and 1 custom service. The first property (infoTeacher) has the following fields: id, name. The second (infoStudent) has the following fields: id, name, idTeacher. Both have data.
The service (GetFilteredStudents) has an input parameter (p_idTeacher) that takes the id field from the line selected in infoTeacher and filters the students as the teacher has chosen.
I want to show teacher information in one List Widget and, depending on the teacher chosen, show in another List Widget the students related to that teacher. Here are my steps:
1) I created a mashup with 2 List Widget; (OK)
2) In the Data session I put my thing (School_TH) with 2 services: My custom service (GetFilteredStudents) and the "GetPropertyValues" service, the latter being loaded when the mashup starts; (OK)
3) I bind to the first List Widget (Teachers) the "All Data" of "infoTeacher" property of the "GetPropertyValues" service; (OK)
4) I bind with the second List Widget (Students), the "AllData" of my custom service (GetFilteredStudents), which will be returned when this service is fired; (OK)
5) I bind the id field of the "Selected Row (s)" of "infoTeacher" property with the input parameter "p_idTeacher" of my custom service (GetFilteredStudents); (OK)
6) And at this point is my problem: For my custom service to work I need to somehow bind a "SelectedRowsChanged" event in order to trigger it. But there is no event of this type related when the rows of my infotable property change, only in relation to the service "GetPropertyValues" as a whole.
How to solve this? I am using version 8.4.3-b2219.
Thank you all.
ps. Forgive me for possible language errors.
Solved! Go to Solution.
Hi,
What you can do is create a service that returns the infoTeacher infotable (output INFOTABLE, and include the data shape of the infoTeacher infotable), and use that to populate your grids instead of GetPropertyValues. In doing so, your service will have the event SelectedRowsChanged, which is what you need to bind to GetFilteredStudents.
Hi,
What you can do is create a service that returns the infoTeacher infotable (output INFOTABLE, and include the data shape of the infoTeacher infotable), and use that to populate your grids instead of GetPropertyValues. In doing so, your service will have the event SelectedRowsChanged, which is what you need to bind to GetFilteredStudents.
Thank you Radu.
A solution a bit more work, but it works perfectly.
@marcusbarrozo , You can Trigger your service with a pushbutton or a double click on the list.
If you configure the list to have the first item selected, then you can use the "ServiceInvokeCompleted" event on the service that loads the data to trigger the loading of the second lists.
I believe you can also configure the widget from the Widget Properties tab to link the selected text to the service.