Hi, We recently implemented a rank that grants the user 2 points per kudos. I have a component that is supposed to do a count of the amount of users and this worked fine until we granted the thanks...
jaread83 - LIQL doesn't support count(*) for KUDOS. It is not possible to achieve this using one query .
However you still can get the exact result . You will need to get the kudos count and pass it to the limit of next query as kudos count will always be greater than giver count.
/restapi/vc/messages/id/1894/kudos/count/
select * from kudos where message.id = 'message.id' and limit <kudos count value>
Let me know if this helps.
Give kudos if you find my posts helpful or mark solution if it answers your query
Hi TariqHussain, thanks for the advice. I have got it to half work but I need to convert the API v2 call to a number in order to apply some logic to it.
Is there a way to convert it to a number so I can get the count?
Basically, what I am trying to do is count the amount of kudos for a message, list the users who gave the kudos and cut it off at a specific number to add a 'and X amount of others'. Here is my code with your implementation:
For "?number" left-hand operand: Expected a string or something automatically convertible to string (number, date or boolean), but this has evaluated to a sequence (wrapper: f.t.SimpleSequence):
==> kudosCount [in template "module-WhoThankedThisPost" at line 20, column 6]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #if kudosCount?number gte 1 [in template "module-WhoThankedThisPost" at line 20, column 1]
How do I get it so the kudosCount to be converted to a number? I am using the ?number but its saying its a string.