Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I require a conditional statement to enable a button when one distinct value is selected in a straight/pivot table?
E.g.
table A:
client_num expression
1 25
2 30
3 35
1 40
Button is disabled by default. However if the user selects one distinct value in field 'client_num' the button should switch to enabled. e.g. if a user selects client_num '1' the table should have 2 rows but since it contains one distinct value (i.e. 1) the button should switch to enabled.
I appreciate any assistance!
Try this expression.
=if(getselectedcount(client_num)=1,1,0)
Use this in layout property of the button to hide and show the button.
Regards,
Kaushik Solanki
Message was edited by: Kaushik Solanki
Hi,
Ignore above post.
Use this
=if(getselectedcount(client_num)=1,1,0)
Use this expression in layout tab of the button properties to hide and show the button.
Rergards,
Kaushik Solanki
Button -> Properties -> General -> Enable condition: =if(only(client_num)=1, 1, 0)
Thanks Kaushik, however your solution will only display the button when there is only one row selected in the table. I need the button to show when there is one distinct value selected e.g. if client_num '1' is selected in my example table two rows would be displayed..in this instance I need the button to be displayed (note some clients may have one or multiple rows). Any other idea?
Cheers
Guys, I have found the answer...I just need to use :
=if(only(client_num ), 1, 0) to enable/disable the button.
Thanks again
Hi,
have a look at the attached example.
Regards,
Kaushik Solanki