Forum Discussion

wearesocialit's avatar
10 years ago

LIQL on custom message status

Hi all,

 

is there a way to make a query on the message table filtering ideas which have a custom status assigned, the minimal proof of concept i came up with reading the documentation follows:

 

SELECT 
id, status, conversation 
FROM messages 
WHERE depth=0 
AND conversation.style = 'idea' 
AND status.key = 'accepted' 
ORDER BY conversation.last_post_time 
DESC LIMIT 5

Of course the accepted key is configured in the admin and has that value:

 

 

If i remove the status.key line the query works as expected.

 

SELECT 
id, status, conversation 
FROM messages 
WHERE depth=0 
AND conversation.style = 'idea' 
ORDER BY conversation.last_post_time 
DESC LIMIT 5

I've already tried to use the other fields of the 'status' but none seem to do the trick

 

thanks in advace

 

cheers

  • wearesocialit - LiQL is limited in allowing the developers to use all the fields as constraints. Here is an idea for this already. However, you could manipulate this using FTL conditions.