Hello
as per title - how can we set the filter for search dialog in javascript
Hello
as per title - how can we set the filter for search dialog in javascript
Hello,
It is possible to filter a search dialog by setting an onSearchDialog event on a property of an ItemType as outlined in this blog.
When calling a search dialog from JavaScript like in your example, you can set the sourceItemTypeName and sourcePropertyName in the parameters you pass in. If an onSearchDialog event exists on the property name you pass in using these parameters, that filter will be applied to the search dialog opened by your code. For a full list of the parameters available when opening a search dialog, please see this blog post on using standard aras dialogs.
Chris
Christopher Gillis
Aras Labs Software Engineer
Hello again Christopher, my code is below could you help me understand what i could bind the onSearchDialog event to? Dialog itself contains just a promise and dom element of dialog. And i tried to connect to the event on the node itself (but it obviously doesnt emit it)
Hello,
For this use case, we typically recommend creating a new property on the ItemType to serve as a placeholder to attach your onSearchDialog event to. This will new property is typically not intended to store any data and should be hidden from every form and grid. You can call this property something like filter_placeholder.
Once you have this new property on the Part ItemType, you can attach your onSearchDialog to it and update your method code to use this new property's name to call the filtering event.
Chris
Christopher Gillis
Aras Labs Software Engineer
not behind my computer but im assuming onSearchDialog is one of the aras events and not a javascript dialog events?
That's correct. It's an event that you can set specifically on Property items.
That's correct. It's an event that you can set specifically on Property items.
Thank you Christopher