Button can be pressed but not clicked

I have a chart and some buttons.
Clicking one of the buttons should change the chart, but I can only find “when button is pressed” and not “when it is clicked”.
Pressed only gives the correct view when holding the button down. I want to change it permanently (Or til other buttons are pressed)

You’ll need to use a custom state for this.

Run a workflow when the button is clicked to set the custom state - then use a conditional based on the custom state to change the data source for your chart.

Thanks for reply @adamhholmes
I spend 2-3 hours this weekend trying to figure it out. Do you have a link to something explaining how I achieve it?

I tried setting a custom state but what type should it be -text?
And I am also not sure what the value should be “Original” (because it is the button searching for Original types) or for the entire string ?

Any of the videos in this search result should help gain an understanding of Custom states and how to set them up:
https://www.youtube.com/results?search_query=bubble+custom+states

There are various ways to do it depending on what you’re trying to achieve and how your app is set up etc…

But, based on your first post, it looks as though you’re tying to change the data source for your ‘Line/BarChart A’ depending on which of the 5 buttons above the chart has been clicked.

In that case I’d do the following…

Have a custom state somewhere (it can be on the chart itself, or on the page, or any other element, as long as you know where to find it - so either on the chart or the page is probably best) called something like ‘display’, or ‘chart data’ (it doesn’t matter what you call it as long as it means something to you).

That custom state should be a ‘text’ type.

Run a workflow when each button is clicked to set the state of your chart to a value that relates to that button.

The values you use for this state can be anything you like, but it makes sense to use descriptive values - so in your case I’d suggest using the names of the buttons (Top All, A350, A250, A150, Original) for the state values.

So, for example when your ‘Button A350’ is clicked, run a workflow to set the Custom State ‘Display’ (or whatever you called the custom state), on the element ‘Line/BarChart A’ (if that’s where you custom state is), to the value ‘A350’.

Then use a conditional on your chart so that when the Chart’s Display Custom State Value is A350. the data source is whatever you need it to be for that particular button.

Do the same for each state value (so you’ll have 5 conditionals on the chart element).

You may want to set a default value for the state (such as the first button’s value) so that data is loaded straight away.

Thanks @niven The first video from buildcamp really explained it well.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.