Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have been working on a project where using On/Off button to apply set filters. The button works perfectly, but problem starts when I click on Clear in the top menu...despite the fact that all selections are cleared, the button stays ON, but it should go back on OFF.
Please let me know if you have any solution for this.
Regards,
Tereza
Good night!
I created a new button in your application that does what you need. I used the function GETCURRENTSELECTION () and seemed to work right. Check and reply me if that was what you wanted, if not reply me what is wrong with this working solution.
Attached hereto qvw your document.
Hug!
Hi ,
I think variable can not be clear,
but an idea is use a button to clear all with action "Clear All", and add another action to same button, that will be
"Set Variable" in set variable change the value to off or 0, try it, but i am not sure...
like
Button Actions:
Clear All
Set Variable
Could you please upload a QVW file showing the button ?
If not, please provide details of the button insights..
You may be able to solve this problem using a variable in order to control de button On/Off sequence..
Hi,
I have clear selection button - where Clear All is applied...and it still does not change the ON button to OFF.
Hi Luis,
for the ON button
Apply Bookmark - bookmarkA
Set Variable - if(vOnOffButton='Show','Hide','Show')
for the OFF button:
Apply Bookmark - bookmarkB
Set Variable - if(vOnOffButton='Show','Hide','Show')
Thanks for help.
Hi Tereza,
See attached example.
I´ve just changed the visibility condition.
Hi Luis,
unfortunately your solution does not work too....when you click on the button and the selection is made the button shows on, but then when you click on Clear all, the button should go back to state OFF...but it stays ON.
I would like to find a solution for this as it could be quite confusing for users to see that a button is still ON, despite the fact there is no selection made.
Tereza,
The default Clear all has no effect on variables, only dimensions.
use a button with actions
Also changed the On / Off button to IF(vOnOffButton=1, 'Off', 'On') instead of show conditionals
Hi Tereza,
One solution could be to link the button status to a field. For example, create a table like this in your script ...
Button:
Load * inline [
Status
1];
Your button text may be something like this ..
=
if(GetSelectedCount(Status)=1,'On','Off')
And one of your button actions needs to select the value 1 in the field Status. When you click clear it will reset the button text.
Hope this helps
flipside
flipside's solution could work better than my suggestion, end users can use the standard clear all functionality
Also change the variable vOnOffButton to : if(GetFieldSelections(Status)=1,1,0)