Skip to main content
16-Pearl
March 3, 2020
Solved

Showing few entity names in Dropdown box using DynamicThingTemplate

  • March 3, 2020
  • 2 replies
  • 1625 views

Hi ,

I am looking to show Entity names in Dropdown box , i have three Things created by adding BaseTemplate as whatever Created ThingTemplate. but in DisplayField of Dropdown widget i have selected name, and its showing me all three Entity or Thing names in Dropdown but i want to show only few (two). Then how it can be done.  plz see added screenshots.

 

Thank you

Best answer by cmorfin

Hi @VaibhavShinde 

 

Here are some possible options:

1) Create a service that does the filtering and output only the desired items. Then bind the ouput of this service to the dropdown menu

2) Use the StateField of the dropdown widget. to use this you can for example add a property state to the ThingTemplate with default value enabled, then set it to disabled for the item you want to disabled.

Note that this will only disable the item, that is it won't be selectable but it will still be shown.

 

Hope this helps

Christophe

 

2 replies

cmorfin19-TanzaniteAnswer
19-Tanzanite
March 3, 2020

Hi @VaibhavShinde 

 

Here are some possible options:

1) Create a service that does the filtering and output only the desired items. Then bind the ouput of this service to the dropdown menu

2) Use the StateField of the dropdown widget. to use this you can for example add a property state to the ThingTemplate with default value enabled, then set it to disabled for the item you want to disabled.

Note that this will only disable the item, that is it won't be selectable but it will still be shown.

 

Hope this helps

Christophe

 

Support
March 13, 2020

Hi @VaibhavShinde.

 

If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon