Toggles working in unison

Hi Guys, I think I have done some3thing wrong in my config but when I activate a toggle, all toggles activate. Explanation:

  1. I have 2 different kinds of toggles:
    a. Favourite - a user can “favourite” a story (This toggle is present on a page containing a list of stories)
    b. Like and Dislike - these are 2 separate toggles next to each other that a user can activate the like toggle or the dislike toggle (This toggle is present on the current story page)
  2. When I tested the favourite toggle, activating the toggle for one story, activates the toggle for all stories. Deactivating the toggle for one story, deactivates the toggle for all stories. Does anyone know why this is happening?
  3. When I tested the like toggle, activating the like toggle also activates the dislike toggle. Deactivating the like toggle also deactivates the dislike toggle. This happens when testing the dislike toggle also. Any suggestions?
  1. Can you provide some more info on this one? Screenshots of database and list setup would be helpful.
  2. My guess here is that you also have an action tied to these toggles, when really toggles have their own actions built in to them. Remove the actions and this may fix, but I kind of need screenshots here as well.

This is the home page which is a list of stories.
Pressing the heart icon activates all heart icons for every story. What I wanted to happen is when a user clicks the heart icon for a story, that story appears on their favs page (2nd tab on the bottom). But instead all hearts are working together and no stories are appearing on the favs page. I did have actions on the toggle but i removed the action and it made no difference to either the toggles working independently or the toggle adding the story to the fav page

I have another toggle on the story page itself (screenshot below). Users navigate to this page from clicking one of the stories from the page above.
The “What’s your vote” toggle does the same thing as the heart toggle. When you click the left hand box, it activates the right hand box and vice versa. I tried to remove the actions from this also, but it didn’t work either
Does this help at all?

Yes it does! Thank you for the screenshots. In the database is there a relationship between users and stories? many users to many stories?

Actually tbh, I am getting very confused with the relationships! Do i need a separate relationship between databases for each and every single way they relate? ie:

  1. Between user and story
    a. 1 user to many stories - to define that 1 user can create many stories but 1 story can only be created by 1 user
    b. Many users to many stories - to define that 1 user can fav many stories and 1 story can be faved by many users
    c. Many users to many stories - to define that 1 user can vote on many stories and 1 story can be voted on by many users

Or do I just need a many to many relationship between users and stories that covers all of the above?

(in answer to your question, i have all 3 of the abovestated relationships in my database :confused: )

does that all make sense?

Yes this is exactly right. For the favorite toggle, you’ll want to make sure the Toggle is to add the current story to the user’s favorite stories. It’s important to properly name relationships so that they don’t get confusing. I’m betting you have it toggling one of the other properties instead.

sorry, when you said “yes this is exactly right” do you mean its right that i need to define specific relationships and not just one blanket relationship?

ok, so I have been playing around with stuff and looks like I have made more of a mess ;(

Now the toggle won’t even let me select anything!

in my database I have a “fav stories” relationship

I even created a new test app to test the below article from scratch and it still didn’t work?

i think i’m going to cry :crying_cat_face:

is there anyone who can (remote or normally) log on to my app and talk me through what I have done? do you know?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.