Skip to main content
Mar 3, 2020 11:23 AM UTC
Solved

Showing few entity names in Dropdown box using DynamicThingTemplate

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

cmorfinAnswer
Mar 3, 2020 3:27 PM UTC

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

cmorfinAnswer
Mar 3, 2020 3:27 PM UTC

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

 

Mar 13, 2020 6:58 PM UTC

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