Forum Discussion

AngelaIp's avatar
AngelaIp
Ideator I
2 years ago
Solved

Query Builder show database names instead of labels - how to improve property selection for complex data structures?

Hi community,

does anyone know how to prevent that Aras use labels for the property selector in the QueryBuilder?

I try to extend a Query Definition, but I would prefer if Innovator shows the native database name of the properties instead of the label:

Note following situation in the image:
- Entries are not distinguishable when they have the same label, like "Document"
- Entries are sometimes just blanks where I have removed the label on purpose

Innovator doesn´t even seem to honor my perfect sort_order of these properties. Does anyone have an idea how to improve the situation? I currently use a pretty old QueryBuilder version. Maybe situation has improved in newer Innovator versions, but I have to work with what I have [emoticon:44a8a53ad3364ea78a16c5a3229f75bb]

Thanks and best regards!

Angela

  • Try edit Modules/aras.innovator.QueryBuilder/Scripts/PropertiesView/propertiesView.ts

    [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:d307d357-f2ad-4eb0-8978-c489c8027af1:type=javascript&text=function%20showSelectedProperties%28%29%20%7B%0A...%0A%2F%2F%20Line%20112%20in%20my%20version%20of%20Innovator%0AcreateNewElement%28parentElement%2C%20%27li%27%2C%20property.className%2C%20property.label%29%3B%20%2F%2F%20Change%20property.label%20-%3E%20property.name%0A...%0A%7D%0A...%0Afunction%20fillSelect%28selectedProperty%2C%20select%29%20%7B%0A...%0A%2F%2F%20Line%20212%20in%20my%20version%20of%20Innovator%0Aselect.add%28new%20Option%28selectedProperty.label%2C%20selectedProperty.name%29%29%3B%20%2F%2F%20Change%20selectedProperty.label%20-%3E%20selectedProperty.name%0A...%0A%7D]

2 Replies

  • Try edit Modules/aras.innovator.QueryBuilder/Scripts/PropertiesView/propertiesView.ts

    [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:d307d357-f2ad-4eb0-8978-c489c8027af1:type=javascript&text=function%20showSelectedProperties%28%29%20%7B%0A...%0A%2F%2F%20Line%20112%20in%20my%20version%20of%20Innovator%0AcreateNewElement%28parentElement%2C%20%27li%27%2C%20property.className%2C%20property.label%29%3B%20%2F%2F%20Change%20property.label%20-%3E%20property.name%0A...%0A%7D%0A...%0Afunction%20fillSelect%28selectedProperty%2C%20select%29%20%7B%0A...%0A%2F%2F%20Line%20212%20in%20my%20version%20of%20Innovator%0Aselect.add%28new%20Option%28selectedProperty.label%2C%20selectedProperty.name%29%29%3B%20%2F%2F%20Change%20selectedProperty.label%20-%3E%20selectedProperty.name%0A...%0A%7D]

  • Hi Alaxala,

    thanks for this fast and perfect solution! In Innovator 12 the same file exists, but it´s a js file instead of a typescript. The code differences are not too big.

    In my version, I had to change an additional 3rd line of code to make the solution work: select.add(new Option(property.label, property.name));

    I found an additional solution which can be handy if somebody needs to select a lot of properties. When you have enabled the relationships in the QueryBuilder, you can directly access the QueryItems. This allows us to add the select properties manually. But it´s not really faster than using the "enhanced" propertiesView.

    Now I can build queries at light speed! Thanks!

    Angela