How to add a toggle option to 'recommend a post' by the user

Hi guys!

In my app, users can recommend a book they liked and share short description on same. So in order to recommend, they have to use the toggle option.

So if the toggle is checked, then the book mentioned in the post is recommended one. If not, then it’s not recommended.

I am getting confused about the database.

Here’s how I have designed the database:

  1. I have added ‘recommended’ in user so that I can show in the user’s profile list of all recommended books by the user.

So, when the checkbox is checked, it saves the title of the book in ‘reco’ed book’ field.

  1. I have added ‘recommended’ in parent post as well.

This is to show the ‘recommended tag’ when the post gets shown in the feed. So if the toggle is checked, it will make the ‘reco’ed’ book’ field to yes, and then the ‘recommended’ tag gets shown in the feed for that post.

  1. I have added the recommended in ‘book’ datatype.

I have created a book data type separately so that I don’t have to use Google books API calls again and again. So when a post is done, the book tagged in the post gets saved in this datatype. So here, if it’s recommended, the value of ‘recommended’ becomes ‘yes’.

All these actions happen from the same toggle button shown at the start. You can also similarly share articles instead of books (which is saved in different datatype called ‘links’ as shown in screenshots).

But when I try to post, the toggle button doesn’t work.

Here’s the workflow for the toggle button:

Please help how to go about this!

Great that you have used screen shots as its very helpful. What is the problem though - what is not working?

Do you see the book in the Reco’ed Books on the user in the database?

Simon

No, in the user’s datatype, the ‘reco’ed book’ title isn’t getting shown.

In the posts and book datatype ( which is a yes/no value) I don’t see anything written. It’s blank.

I have kept the default value for the yes/no to no.

I wonder if the conditional on the step that adds it to the user is stopping it from being added?

Simon

I removed it, and it still didn’t execute. The book title didn’t get saved

Ok,

It maybe your repeatingroup Google book’s selected book:first item’s Title - is that a state you set? i.e. selected book?

Simon

Yes, so this is what is happening:

When user clickks ‘add a book’ the search box opens. Then person types the book name. The repeating group shows all values (using google books API). then when add is clicked, the value of that cell gets saved as a custom state. This state then gets shown in the bottom single line repeating group.

enable auto binding?

What does this option do?

make it work!

It updates the record in real time, ie you don’t need a workflow to save the recommended post status.

One thing you need to check is in the privacy tab that the user has permission to auto bind that input.

you can’t autobind to a list of texts?

Maybe you can share the editor with me via a PM and I can have a quick look

Simon