Don't close the searchdialog

How can I do when I open the item searchdialog and doubleclick, do not close the searchdialog?
Parents
  • Hello, It is possible to set a filter from an onSearchDialog event on the Property that opens the dialog using code like the sample below. <script src="">gist.github.com/.../script> However, since you are opening this dialog from a method instead of directly from a property, you will need to follow the steps below to add a "dummy" property that will hold the filter for this search dialog.
    1. Create a "dummy" property on the ItemType that is calling the search dialog with the following information
      1. Name: dummyForFilter
      2. Type: String
      3. Length: 1
      4. Hidden1: true
      5. Hidden2: true
    2. Right-click on this new Property and select "View Properties"
    3.  Create a Method with the filter code above and add it as an "onSearchDialog" event to this property
    4. Save, unlock, and close both the Property and the ItemType
    After adding this filter, you will need to modify the method that opens the search dialog to pass in this dummy property as a parameter using the sourceItemTypeName and sourcePropertyName parameters as seen in the sample below.
    var param = {
    aras: top.aras,
    type: 'SearchDialog',
    dialogWidth: 700,
    dialogHeight: 450,
    itemtypeName: 'Part',
    multiselect: true,
    handler: addRelationshipHandler,
    sourceItemTypeName: "Part", // <-- The name of your ItemType
    sourcePropertyName: "dummyForFilter" // <-- The name of your dummy property
    };
    Following this example, you will see that the "state" column of the resulting search dialog now auto-populates with a value of "Released" and cannot be changed. Chris _______________________________ Christopher Gillis Aras Labs Software Engineer
Reply
  • Hello, It is possible to set a filter from an onSearchDialog event on the Property that opens the dialog using code like the sample below. <script src="">gist.github.com/.../script> However, since you are opening this dialog from a method instead of directly from a property, you will need to follow the steps below to add a "dummy" property that will hold the filter for this search dialog.
    1. Create a "dummy" property on the ItemType that is calling the search dialog with the following information
      1. Name: dummyForFilter
      2. Type: String
      3. Length: 1
      4. Hidden1: true
      5. Hidden2: true
    2. Right-click on this new Property and select "View Properties"
    3.  Create a Method with the filter code above and add it as an "onSearchDialog" event to this property
    4. Save, unlock, and close both the Property and the ItemType
    After adding this filter, you will need to modify the method that opens the search dialog to pass in this dummy property as a parameter using the sourceItemTypeName and sourcePropertyName parameters as seen in the sample below.
    var param = {
    aras: top.aras,
    type: 'SearchDialog',
    dialogWidth: 700,
    dialogHeight: 450,
    itemtypeName: 'Part',
    multiselect: true,
    handler: addRelationshipHandler,
    sourceItemTypeName: "Part", // <-- The name of your ItemType
    sourcePropertyName: "dummyForFilter" // <-- The name of your dummy property
    };
    Following this example, you will see that the "state" column of the resulting search dialog now auto-populates with a value of "Released" and cannot be changed. Chris _______________________________ Christopher Gillis Aras Labs Software Engineer
Children
No Data