cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to disable and enable button by selecting multi-selected dropdown widget in thingworx.

Hrishabh.Sharma
12-Amethyst

How to disable and enable button by selecting multi-selected dropdown widget in thingworx.

I want to validate the button when I select the multi-selected dropdown values, the button should be enabled, and vice versa.

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @Hrishabh.Sharma 

 

You can create a service to validate multiple selected rows and based on that you can enable and disable the button

 

Create service with infotable input 

var result = true;
// selectedValue : InfoTable Input
// If Infotable contains multiple rows
if(selectedValue && selectedValue.length > 1)
{
    // enable button
    result = false;
}

 

Mashup Binding should look like this :

Velkumar_0-1684496207623.png

 

Mashup will look like this :

 

Velkumar_1-1684496259741.png

 

Velkumar_2-1684496284875.png

 

Velkumar_3-1684496303075.png

 

When multiple value selected button will enable

 

/VR

 

 

View solution in original post

3 REPLIES 3

Hi @Hrishabh.Sharma 

 

You can create a service to validate multiple selected rows and based on that you can enable and disable the button

 

Create service with infotable input 

var result = true;
// selectedValue : InfoTable Input
// If Infotable contains multiple rows
if(selectedValue && selectedValue.length > 1)
{
    // enable button
    result = false;
}

 

Mashup Binding should look like this :

Velkumar_0-1684496207623.png

 

Mashup will look like this :

 

Velkumar_1-1684496259741.png

 

Velkumar_2-1684496284875.png

 

Velkumar_3-1684496303075.png

 

When multiple value selected button will enable

 

/VR

 

 

Instead of the extra service https://github.com/doubleSlashde/InfotableInspectorWidgetTWX could be used to get Selected-RowCount in Frontend and evaluate button "disabled"-state via expression. But needs the extra extension - depending on how often it is needed the extension may be useful.

Thanks, @Velkumar 
I appreciate your time.

Announcements


Top Tags