Aras Community

Welcome to Aras Community Sign in | Join | Help
in Search
Aras Community
Please Also Visit the Project Site to Download Add-Ons and Solutions
Jump to Projects

How to search over relationships?

Last post 07-24-2008, 3:19 AM by Martin. 4 replies.
Sort Posts: Previous Next
  •  07-17-2008, 9:05 AM 992

    How to search over relationships?

    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

  •  07-19-2008, 5:08 PM 993 in reply to 992

    Re: How to search over relationships?

    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. 

     

     

     

     

     

     

  •  07-22-2008, 4:45 PM 1000 in reply to 992

    Re: How to search over relationships?

    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.
  •  07-23-2008, 2:55 AM 1007 in reply to 992

    Re: How to search over relationships?

    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.
  •  07-24-2008, 3:19 AM 1009 in reply to 1007

    Re: How to search over relationships?

    Hi,

    sorry for the late answer, I had some appointments with customer. 

    sounds promising, thank you for the ideas I will try it.

     

    Martin

     

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems