Martin - Thursday, July 17, 2008 9:05 AM:
Hello,
assume I have created an Item type "Person" and an Item type "Skill" and a relationship "Person Skill". Now I wanna search for all Person with a specific skill. While the querry is not the problem, I have no real idea how to integrate the search into the Aras client. One approach might be to add a text field and a button to the form of Person, change from the simple search view to the form search view, type in the skill and press the button which calls a server side method for search and fills the search grid with the result (but how, I m not sure which is the right control on the client).
But maybe another approach makes more sense... any idea or help welcome.
Thx
Martin
jonasach - Saturday, July 19, 2008 5:08 PM:
Have you thought about exposing the "Person Skill" relationship in the main TOC?
You could do this without any programming.
You could add foreign properties to the relationship which come from the parent Person itemtype and the related Skill.
SamsAn - Tuesday, July 22, 2008 4:45 PM:
Try this trick to find required Persons using Form mode. Add an additional hidden field (type=html) to Person default form. Input special javascript in the field and input element (to enter specific skill value). The javascript should define is it Search Mode and display and the input and append corresponding portion to the query on skill value change. So, selecting Persons in TOC, you should be able to find appropriate persons in Form search mode.SamsAn - Wednesday, July 23, 2008 2:55 AM:
New thought. You can use federated property (skill_fed, label=Skill, hidden=0) and OnBeforeGet event for Person ItemType.Then user selects Persons in TOC, inputs criteria in skill_fed column, clicks Run Search. OnBeforeGet event recieves the criteria and handles it in appropriate way:
if (this.getProperty("skill_fed", "")!="")
{
// Setup appropriate criteria in "this" object
this.setProperty("just_for_test", this.getProperty("skill_fed", ""));
}
Please note, it seems consistent to populate skill_fed property in OnAfterGet event for Person ItemType when this way is selected to be implemented.
Martin - Thursday, July 24, 2008 3:19 AM:
Hi,
sorry for the late answer, I had some appointments with customer.
sounds promising, thank you for the ideas I will try it.
Martin