Forum Discussion

Kitty's avatar
Kitty
Ideator I
6 months ago

Customize labels of search grid by classification

Preparing several forms for an ItemType by classification can change those labels on the same property.
But can I do that on search grid too?
For example, apply a client method to watch the search criteria of classification and switch the label. 

2 Replies

  • Interesting use case! So people select a specific classification in the grid, click "Search" and the labels in the grid will change? Is this correct?

    I assume the use case is not easy to solve. You could probably replace the OOTB "Search" CUI button used for Parts with a custom one and do some additional JS tricks to change the labels. In the browser debugger you can see how property name and label are connected in the final table.

    Things will become interesting as soon as you have a language pack or people hide/unhide columns or use other search modes. And of course you have to reset the labels as soon no classification is used. In best case you can fetch the label names directly from the ItemType and don´t hardcode them in the code. 

    To be honest: Try something else first! Are xClassifications an option? They are more flexibly regarding additional properties.

    EDIT: Maybe the Property events can also be used for something like this. But I don´t know. The whole use case reminds me to the way language pack works. 

    • Kitty's avatar
      Kitty
      Ideator I

      AngelaIp Thanks for your responding. I have same thought with you.
      I'll try xClassifications since my customer won't to dive too deep in this.