In short, yes. How to execute it would depend on what component you are using to display the records.
The common thread is that you will want to create a custom field on your object called “Thumb” or something similar. Make it a picklist field with two picklist options: Up or Down. Then use a button or row action or image component… to trigger an action sequence that updates the Thumb field to either Up or Down and saves the changes.
I love that! Couple follow up things on that - Would the user click on the picklist field itself? Or would there be a way to just display the image of a thumbs up and an image of thumbs down so the user can click on that, and maybe show a number next to it of the number of likes or dislikes?
Add a “button group” to the table or form where you are collecting the data.
- Button 1 is thumbs down - and has an action to set the field value to “Down”
- Button 2 is thumbs up - and has action to set field value to “Up”
If you want to toggle back and forth you have to prevent a null state (or handle null as a third schenario). Assuming that default state is “Down” – conditionally render the two buttons so they only show when they have the correct value, but then set actions to set the data to the opposite. (Click Down to toggle to Up).
Tricky. But easy…
could that work to count the number of likes or dislikes? so if we have our community users voting on these articles which ones they like or they dont, Ideally it would be cool to make it like “facebook” type thing, where people see how many likes or dislikes that article has, and who liked or disliked them. is that too complex?
Hmmm. It seems like having the “thumb” field on the Article object would give you just one e value for each article (the article is either thumbs up or thumbs down for all users). But what you’re looking for is the ability for each user to like/dislike an article.
I think this may need to be a junction object situation:
- “ArticleLikes” is a new object with a lookup to Article and a lookup to User.
- Create a field in this new object to track whether the article is liked, for example a checkbox field.
- Then you can have a rollup summary field in Salesforce or use Skuid aggregate models to see how many “likes” an article has, and you can can create likes on a per user basis.
Does that make sense?