I have two tables "Services and Projects". Both tables have a "Name" field. I would like to take both fields from both the tables and put them into a single autocompletebox in one of my screens. I searched around and found different methods of doing this but not in LightSwitch. Any ideas?
Asked
Active
Viewed 115 times
0
-
What exactly do you need? Asking how to get the combine fields data? Asking how to display the data using autocompletebox? Asking how to put the autocompletebox in the LightSwitch? Please.. – Yuliam Chandra Sep 11 '14 at 03:49
1 Answers
0
If I understand your requirement correctly, you want the Name property from both Services and Projects to appear in a single textbox? If this is the case, my approach would be as follows:
- Use a view on the data source to union the Projects and Services data sources
- Add that view to your data model (on a new data connection)
- Define Name as the summary property for the new view-based entity.
- Add the view to your screen as a separate query
- Add the view data object to your screen as an auto-complete box.
WARNING: You'll also need code-behind to identify whether the value selected is a Project or a Service and to apply this value to the relevant field in your linked entity.

Ozziemedes
- 311
- 1
- 6