Hey Guys!
As on post tittle - I would like it if a given work has 999 likes on the thousandth like, the caption 1k should automatically appear, any advice how to achieve that effect?
Entire workflow is really easy :
And here is likes display where I want to do that action:
Condition:
Parent Group's Shot's shotlikes:count ≥ 1000
Text: Parent Group's Shot's shotlikes:count/1000 K
But keep in mind if you want it to scale for a lot of users, a list field with 1000 things isn’t a good idea, this is better structure:
Yes, you make another datatype called “Like”
With a field for Post (Post datatype) and a field for User (User datatype)
When they click like it creates a new Like, sets those two fields. Then later in the future if you want to look at all your liked posts you do Do a search for Like, constraint User = Current user, then do :each item's Post
Or to get all the Users that liked a specific post, you do Do a search for Like, constraint Post = [specific post], then do :each item's User
There would…
jobs
October 27, 2023, 6:12pm
3
There’s a plug-in “number shortener” that I used years ago for this
andero
October 27, 2023, 8:01pm
4
shot_likes / 1000 > 1: formatted as text
Yes - {shot_likes}/1000 K
No - {shot_likes}
ed19
October 28, 2023, 5:23pm
5
You could easily scale this into 10k, 100k and millions with nested if statements (format as text).
Likes < 1000:format as text (
Yes = Likes
No = Likes < 1000000:format as text (
Yes = Likes / 1000 “k”
No = Likes / 1000000 “m”
)
)
This will output: 1k, 10k, 100k, 1m, 10m, 100m
You can keep nesting obviously, but 100m is a fair few!!