Forum Discussion
grahamgatus per the documentation, I don't think this is possible with a SELECT statement:
featured |
Whether or not the message has been selected to be featured using the Feature this Topic option from the Topic Options menu in the community. Note: This property is only returned when it is included in a partial response query. It will not appear in a statement such as SELECT * from messages. |
boolean |
You would need to do one call
select id,conversation.featured from messages where depth=0
Loop through the results. Test if conversation.featured='true'. And do another call to get the needed information from the message:
select <the_fileds_you_want> from messages where id='<the_id>'
Note: I haven't tested the workaround and can't guarantee this is the best option
I've raised a support iicket and they have also mentioned it is not possible.
For now, the solution I am going with is to build an Endpoint, and perform the 2 queries there (one to fetch featured messages, and one to fetch non featured messages), and merge the 2 result sets together, withfeatured messages ordered above the non featured.
Creating an Endpoint was trivial, and was up and running in an hour or so :smileyhappy:
My requirements have now expanded, and I also need to fetch the avatar for the author of each message, so I need to use an endpoint anyway to be able to condense multiple queries down into a single URL.
Related Content
- 3 years ago
- 2 years ago
- 4 years ago