Push a button and the number written at the hand changes

Hello everyone,

I am creating a clone Twitter but particular. You will understand why I say that.

There are two interfaces:

First interface : A normal feed like we can see on X and used by the communication manager.
Second itnerface : A feed where another user (A consultant) can indicate the numbers of Likes that he wants to show. So It is totally fake but it is to train de communication manager. Indeed, the Social network communication would be different with 2 likes or 1millions of Likes.
Till then, I am okay, I did it.

Now I want to create an interaction with the Like system. I saw video with the dynamic but my Clone X is different. Indeed, I want to add+1 or +numbers of Real Likes (For example when the communication push on the heart) and in addition with the numbers that it is indicated.

For exemple:
The consultant who wants to train the communication manager writes a tweets and indicates that the tweet is liked by 23 people.

On the normal feed used by the Communication manager, this last can see the tweet and 23 likes. But he clicks on the heart and there is 24 likes (23+1).

So is it possible to have an addition function or is there another method ?

I hope I am clear, if not I can reformulate :slight_smile:
Thank you so much

Clear enough! :smiley:

Okay - So yes this is totally possible. I’ll explain it:

The first thing to know is that the clicking of the button is totally separate from what is being displayed on the button.

So let’s just talk about the real likes first. When someone clicks the button you can start a backend workflow to update the value of the likes so it’s not visible on the frontend. Done.

Now displaying the info to the user.

You know your database better than I, but let’s pretend it’s easy to put the conditional of what data to show the user on the tweet itself. So on the tweet datatype we’ll have a list of users who are in the “ViewingFakeData”. And we’ll have a datatype of “FakeLikeValue”.

So then on the tweet’s “likes” you can display the fake data if the user is on the list. And if they like the post you can make the frontend display a number 1 greater than the fake value, while correctly adding the real value as described above.

You can create another user that can add users to view the fake tweet values.

As you said; if I’m not clear let me know!

Hello,

Thank you so much for your reply. It helped me a lot. I did it, it counts. But now I realize that it is not over. So maybe I have to think the data differently. I show;

Below is a screenshot of my Workflow:
Capture 22.10 CountLike_ Workflow 1

But i realize that when the user like, it will count forever.

Now, I need to create an option that does -1 when the user dislikes. I watched a Youtube video but it’s different because in the workflow, it has the “add” option but I don’t have it when I create my workflow.

Here is what it says on my side:
NumberofLikes = Current cell’s Tweets’s NumberofLikes + 1

But the Youtuber (Jason Masina) says:
Likes add current user

I think because he created a “Likes” field (column) in his database. But I didn’t do it.

Do you think that with my method, I can do a -1 with the condition (or “only when” or other) when the user has already liked
OR I create the same method as the Youtuber, so I add a field “Likes”?

Thank you a lot!

The YouTuber is doing it a better way than I suggested:

If you do it my way you can’t track which users have liked the tweet.

So you can make a list of users who have liked the tweet. And use that list’s:count to get the number of likes.

1 Like

I did it with success!
Thank you man :slight_smile:

1 Like

I asked a last question in case of you know.

I want to create a table or a repeating group where we could find all the Tweets liked.

So when the user likes the tweet (Push the heart), in another table we can see the tweet and the username of the guy who liked the tweet.
But I want that when the user dislikes the tweet, the information on the other table or repeating group is deleted. So we don’t see anymore the tweet because finally he did not like. I mean the tweet on the second table because the tweet still exist, sure.

So i achieved to create a repeating group and when the user like, the username and tweets appear on the repeating group.

But i don’t know how to delete the tweet (only on the second repeating group) when the user unlike the tweet.
Do you think it it possible ?

Thank you

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