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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

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

Hrishabh.Sharma
11-Garnet

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

 

 

nmutter
14-Alexandrite
(To:Velkumar)

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