Trying to make a simple "Go to page when thing is enabled (yes/no)"

Basically what the title says.

I have a thing, that is able to be turned on/off with a toggler.

All I want to do is make it so when the “Thing” is enabled (yes), someone gets sent to a page.

This is my “Only when”

and a picture of the “Search for”

Pretty simple… I’m still new :stuck_out_tongue:

I’m searching, trying numerous ways… and I’m still not able to figure this one out. This is so simple… someone has to be able to give me something. lol

Hey! Switch up your Only when…

settings_systems's:first item's enabled is "yes"

1 Like

Also, are you using workflow event ‘Do when condition is true’?

Thanks for the reply!

Yes.


and my table:

image

This still doesn’t work.

I’m making a maintenance page, when it’s turned on, my Navbar has a page load function that “should” activate when the setting is on, but it’s not working. Even when I switched the Only When like you had stated.

Appreciate your time.

I think you need to place the condition into the workflow itself, not its first action.

So define a workflow “Do when condition is true” and put the “only when” condition in here. This will define when the workflow will get fired. And you put the got to page maintenance action into this without condition.

I would have the toggle be what triggers it. Here’s a look at one of mine for a similar function:

When the toggle is switched on (checked) it triggers the 3 steps.

1 Like

My attempt :frowning: unfortunately doesn’t work.

As for Telah, I have my settings on a different page that are connected to a list for the settings.

The toggler changes the options accordingly, so I must be doing something wrong with my logic haha.

Furthermore, the workflow is triggered from my websites main NavBar Resuable element. On Page Load… even tried When settings_systems's:first item's enabled is "yes" with constraint of "db_name = maint"

Just to get this clear:
You want to trigger the navigation action when two things happen: (1) a switch on your page is in a specific state, and (2) a certain data condition is given. Correct?

And your workflow is in the reusable element?
And the switch on your page outside the reusable element?

1 Like

giphy-49
⠀⠀⠀
That’s what’s missing - the reusable element part!

2 Likes

I have a separate page. It’s the admin settings page.

It’s linked to the list of settings. Has a toggler inside the list. The toggler sets the “data table” of system_setting (whichever one is listed) to enabled = true/false. The data reflects on the table.

I have a reusable element on the main pages, that has the workflow trigger you have seen above that I want to trigger When the setting Enabled is “yes” via Data.

Hope that’s not too complex.

Ah, got it. :slightly_smiling_face:

Yes that should be not too complex indeed. I found the “Do when condition is true” workflow sometimes unreliable if relating to stuff that is not happening on the page. You can try the “Do every 5 seconds” thing instead. If that does not work either then the problem is somewhere else.

That’s the thing though, it’s not happening on the page. It should read whether or not the “Thing” is enabled yes/no then act accordingly, right?

Yes. So you have user A who is flipping the switch and that should result in user B who is on another page (with the reusable element) to be sent to somewhere else, right?

In this case the browser on user B side needs to identify when to send the user to the other page, in other words needs to check against the server has the data changed or not on a regular basis.

Now you either do that manually (e.g. with a do every 5 seconds workflow using your search) or rely on Bubble maintaining the data relationship based on your search and checking automatically.

The latter did not work well for me if the data is not displayed on the page for user B.

I think I kind of see what you mean here…

When logged in as the user that turned the setting on, I can see the action actually works.

Made an alert on When this setting is enabled “yes” (do every 5 s).

Now, when I go to page on my non logged in user, it doesn’t do anything.

So confused! hehe.

Have you set privacy rules for the data so the other user might not be able to access it?

You can check by displaying the :count of entries you get from your search.

I feel like it wouldn’t make sense to expose some things. Like should me even exposing that matter? The workflow happens in the backend, at least I thought.

I’ve removed all privacy rules, and it still occurs :frowning:

EDIT:

Okay, I played around a little more with privacy rules. I need to EXPOSE searches. Otherwise the “search for” just wont work for the user, period.

I believe I got it to work by doing that, and using the solution @telaholcomb had provided me.

Thanks guys for your time. I can now move on with the project! :slight_smile:

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