Forum Discussion

AngelaIp's avatar
AngelaIp
Ideator I
5 months ago

How can I choose a specific Search Mode when opening a Search Dialog via Method?

Hi community,

I use following code to open a classic Part search dialog. 

[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:e11e18e7-06f2-4dd3-8697-899cd4f649c4:type=javascript&text=const%20param%20%3D%20%7B%0A%20%20%20%20aras%3A%20aras%2C%20%0A%20%20%20%20type%3A%20%27SearchDialog%27%2C%0A%20%20%20%20dialogWidth%3A%201200%2C%0A%09dialogHeight%3A%20500%2C%0A%20%20%20%20itemtypeName%3A%20%27Part%27%2C%20%20%0A%20%20%20%20defaultSearchMode%3A%20%22AML%22%2C%20%20%2F%2F%20%3F%3F%3F%3F%3F%3F%0A%7D%3B%0A%0Aconst%20topWnd%20%3D%20aras.getMostTopWindowWithAras%28%29%3B%0AtopWnd.ArasModules.MaximazableDialog.show%28%27iframe%27%2C%20param%29.promise.then%28callback%29%3B]

Is it possible to pre-select the used search mode?

Typically the "Simple" (Einfach) search mode is preselected. I have an additional custom search mode that is similar to Simple, but allows users to search for all generations of a Part.

In my use case user shall be able to search and select previous Part versions. So it would be convenient if my custom search mode would be selected automatically when the search dialog is opened. 

I guess this is currently not possible. But maybe somebody has an idea?

Thanks!

Angela

3 Replies

  • Hi Angela,

    I usually try to use 'Default Search' option on item_number property


    Which result in search window like below:


    Not sure this helps with your requirement

    • AngelaIp's avatar
      AngelaIp
      Ideator I

      Thanks for your fast help! I have to admit, you answered my question very accurate and precisely! Unfortunately, my screenshot was a bit misleading. Here's what I'm was actually looking for:

      I don´t think it´s possible to pre-select the search mode in the dropdown. But - good news: I think it was a bad idea from the start and I currently don´t need a solution anymore!

      The use case was related to a custom change management process. For a very specific scenario users should select only previous item revisions.

      But now I will just start from the latest item and than automatically collect previous versions and let user decide if they want to do an update/float of the items. There are more than one previous item versions anyway.

      The whole idea is related to this post to achieve a controlled float behavior:  link 

  • Thanks for the update — your new approach sounds like a smart workaround! Starting from the latest item and programmatically gathering previous versions makes sense, especially when multiple revisions are involved. It keeps the UI cleaner and avoids relying on dropdown behavior that’s hard to control. animal rampage 3d

    I’m also curious about your controlled float strategy — are you planning to log user decisions when they choose to float or not? Would love to hear more about how you’re implementing that logic.