How would I filter a select control to display selected records only?
we already have the data but want to filter it without a service call.
thanks.
Hi Meyrick,
Your program don’t currently work because you are mapping the second table on the main read instead of second local read using a ROW call every time the first table value changes.
What I would do:
- I would have these services:
- Mappings for clkSrchRead:
- Mappings for clkSrchRow:
- Every time the Parent combo-box change, I would fire the ROW services to read the Child Table locally and populate the second combo-box:
This is the basic idea on how I would do it. There might be more to populate the child Combo-box. Things like cleaning it and making sure the data is displaying properly (not sure if anything is needed). Since I don’t want (and can’t because of passwords) work on your project, this is as far as I can take it. Please let me know if it helps!
Here is a description of what im trying to accomplish.
What’s happening is, I’m building a dataset with two temp tables. One as the parent and the other as the child.
The logic works as follows:
For each employee, there are certain parts linked to them with each part having special prices.
On the app server side, the data is being dumped out correctly. On the client side the drop down (select control) for the employee populates correctly but the parts drop down pulls back all the parts linked to all those employees instead of just the parts for the selected employee. Also the special price linked to that part, needs to be displayed in an input control so the user can still edit the price if need be.
In the beginning I was using three business entities. One to pull the employee, one to pull the parts and one to pull the special price which worked fine. I am now trying to put this all into one business entity as it makes writing back to the database a lot easier.
Does anyone perhaps know how I can filter through the records on the client side in the dataset so that only the parts for the employee are displayed in the drop down or does anyone maybe have another idea for me?
Hi Meyrick,
Your program don’t currently work because you are mapping the second table on the main read instead of second local read using a ROW call every time the first table value changes.
What I would do:
- I would have these services:
- Mappings for clkSrchRead:
- Mappings for clkSrchRow:
- Every time the Parent combo-box change, I would fire the ROW services to read the Child Table locally and populate the second combo-box:
This is the basic idea on how I would do it. There might be more to populate the child Combo-box. Things like cleaning it and making sure the data is displaying properly (not sure if anything is needed). Since I don’t want (and can’t because of passwords) work on your project, this is as far as I can take it. Please let me know if it helps!
Hi Ricardo, how does the _id field work on the table? I have done what you have shown me but the Row service is not being called on value change for some reason.
Thanks
knowledgebase.progress.com/.../000041675
Are you using CRUD or Invoke operations?
Hi Ricardo, thanks for the help. i have managed to solve my problem.