UX - Secondary Nav - Goto Form(s)

I want to get this View/Form(s) data from the SOAP response that happens between the selection of an ItemType and the building of that IT's Secondary Nav.

I then want to use my new friend,  aras.uiShowItem("Form", the_form_id) to go straight to the related form(s) for an Item Type.

This is another (especially administrative) convenience I'd like to implement for smooth sailing.

Parents
  • Hi Neil,

    If I'm understanding correctly, you're trying to follow the same approach as you did in this blog post to add another button to open up the Form definition. This is a little trickier as ItemTypes can have multiple Views and thus multiple forms related to them. There would need to be some logic to determine which form to open (maybe the one with the highest display priority) or some way to prompt the user for a selection.

    With that being said, if you wanted to get the related Forms, the easiest way to do it would just be to query for the Form(s) when the user clicks the button. Since you already have the ItemType ID, you can do a quick query to find all of the Views that have that ID as the source_id. You original idea of editing the base query for the ItemType to also get the View relationships could also work, but I'm not sure where that change would be made, and it might also slow down the experience for non-administrative users since more data needs to be retrieved from the database.

    As a complete alternative, I'd like to suggest the Quick Open Item community project which uses CUI to add a dropdown and search field to the top bar of Aras Innovator. The default example uses Part, Document, and CAD, but you could easily modify it to instead use administrative ItemTypes like ItemType, View, Method, etc. The default example also exposes these ItemTypes to World, but you could also easily change this to only be visible to Administrators. Using CUI also means you would no longer need to make updates to the codetree, so you won't need to clear your cache every time to see the changes you've made. 

    Chris


    Christopher Gillis

    Aras Labs Software Engineer

Reply
  • Hi Neil,

    If I'm understanding correctly, you're trying to follow the same approach as you did in this blog post to add another button to open up the Form definition. This is a little trickier as ItemTypes can have multiple Views and thus multiple forms related to them. There would need to be some logic to determine which form to open (maybe the one with the highest display priority) or some way to prompt the user for a selection.

    With that being said, if you wanted to get the related Forms, the easiest way to do it would just be to query for the Form(s) when the user clicks the button. Since you already have the ItemType ID, you can do a quick query to find all of the Views that have that ID as the source_id. You original idea of editing the base query for the ItemType to also get the View relationships could also work, but I'm not sure where that change would be made, and it might also slow down the experience for non-administrative users since more data needs to be retrieved from the database.

    As a complete alternative, I'd like to suggest the Quick Open Item community project which uses CUI to add a dropdown and search field to the top bar of Aras Innovator. The default example uses Part, Document, and CAD, but you could easily modify it to instead use administrative ItemTypes like ItemType, View, Method, etc. The default example also exposes these ItemTypes to World, but you could also easily change this to only be visible to Administrators. Using CUI also means you would no longer need to make updates to the codetree, so you won't need to clear your cache every time to see the changes you've made. 

    Chris


    Christopher Gillis

    Aras Labs Software Engineer

Children