cancel
Showing results for 
Search instead for 
Did you mean: 

unable to enable the button when lead selection changes

Former Member
0 Kudos

Hi,

I have a condition where I have to set a button as disabled when i select a row from a table and click on this button and it should be enabled for other rows.

Right now I am able to disable the button but when i click on any other row it still remains disabled n m not able to click on it.

Please help.

Regards,

Reinuka.

Accepted Solutions (1)

Accepted Solutions (1)

former_member214651
Active Contributor
0 Kudos

Hi,

Is there any condition to enable the button. i.e, on which click of the row will the button be disabled and on which row should the button be enabled?

What u can do is

1. Get the lead selection from the table by creating an action for the lead selection of the table.

2. Based on the value of the lead selection, either enable or disable the button

Hope this helps you.

Regards,

Poojith MV

Former Member
0 Kudos

yes , we have a condition based on which we are enabling/disabling the button.

We are running a process on clicking on this button and this button should become disabled as soon as it is clicked for a particular row.This button should be enabled after 50% process is complete for that particular row.

It should also remain enabled for the other rows which are yet to be selected.

Thank you.

Regards,

Reinuka.

former_member214651
Active Contributor
0 Kudos

Hi,

Did u try the method which i mentioned for getting the lead selection of the table? Also, once the button is disabled, the action of the button will not be triggered.

However, to help you more, please explain with a scenario as i could not completely understand what u have explained in ur previous reply.

Regards,

Poojith MV

Former Member
0 Kudos

hi poojith,

thanks for your reply.

the scenario is - on selecting a row we are clicking on a button for running a process.when we click on this button, this button should be disabled for that particular row.It should not get disabled for rest of the rows so that when we click on any other row it should come as enabled.

The purpose of disabling the button is so that when we click on the same button right after the first click nothing should happen for that row.

Right now,i am able to disable the button but when i select any other row it comes as disabled.

I want this button to be enabled for which it has not been clicked even once..and disabled for the row for which it has already been clicked..this is a weird requirement but need to fix this.Please help.

thank you.

Regards,

Reinuka.

former_member214651
Active Contributor
0 Kudos

Hi,

try following the steps and check if it works:

1. On click of the Row, capture the index or the row number of the table.

2. Once he completes the process, store the row index in a Temporary List / Node and disable the button.

3. On the next click, check if the row index is present in the List / Node, If exists, then disable the button else enable the button.

If this setting needs to be permanent, then store the Row Index in a DB table or delete the row after the operation is completed (If not required any more to be seen in the table):

Removing the row can be useful as it avoids the problem of enabling / disabling the button

wdContext().node<nodeName>().removeElementAt(<rowindex captured>);

Hope this helps you.

Regards,

Poojith MV

Former Member
0 Kudos

THANKS POOJITH.

your first answer helped itself.

Thank u so much.

Regards,

Reinuka.

Answers (0)