Data display doesn't match with database

Hello,

I have a problem, when i click on the button the display and data change in my database but after refresh, the display and data doesn’t pick the information from the database.

Thank for your help

Hi there, @toms1234… after watching your video, my first thought is maybe it’s related to the button itself? What is the condition that changes the label/display of the button? Or is it two separate buttons, and they are being hidden/shown based on the value in the db?

Best…
Mike

Hello Mike !
yes it’s two seperate buttons and i use hide show in my workflow, i give you the permission if you want to look, thanks for your help :

Yup, it’s the buttons. :slight_smile:

You have the Public button hidden on page load, so even though you are showing that button as part of the workflow, the button gets hidden again every time you reload the page.

I think I would remove the hiding/showing of the buttons from the workflow and hide/show them based on conditions on the buttons themselves (with the conditions tying to the values in the db). Does that make sense?

Best…
Mike

Ok i will try with conditionnal, thank you Mike :wink:

No problem at all… if you have any trouble getting it to work, I’d be happy to help out.

Best…
Mike

Thank you Mike, it’s working ! Awesome :slight_smile:

My pleasure… happy to hear it’s working now!

i take this opportunity to resolv another problem about this button :

I would like to do “upvote button” and limit one like per user. So i tried with “show and hide” & “+1/-1” in order to limit the like, but now that i understand how to proceed with “Yes/No” value, i don’t have any idea, how to do that whith number value…

If you can enlighten me :slight_smile:

https://bubble.io/page?type=page&name=dashboard&id=roadmapio&tab=tabs-6&subtab=General

That one is a bit trickier, but I would probably go with something like what Nigel proposed in this thread…

So, when a user votes on an item, you add the item to a list on that user, and then you conditionally hide (or disable) the upvote button based on whether or not the item is in the user’s list. Does that make sense?