This project is read-only.

Please help! Filtering, queries and checkboxes!

Topics: Administration, Customizing Orchard, General
Aug 5, 2013 at 11:15 AM
Hi there,

I am currently getting very confused and stuck . . . .

I am trying to filter some properties using different criteria on my website.

I am using a form with several checkboxes. The first three have the values of 'PropertyInfo1', 'PropertyInfo2' and 'PropertyInfo3'.

I have created a query which checks the value of these checkboxes to filter out the correct results. The query is as follows:-

Select properties where PropertyInfo equal to Request.QueryString:PropertyInfo1}
Select properties where PropertyInfo is equal to Request.QueryString:PropertyInfo2}
Select properties where PropertyInfo is equal to Request.QueryString:PropertyInfo3}

This works well however I now want to add in and AND statament to the query. As I have done this via the front-end I am unsure how to do this. I want to check the value of PropertyCommerce as I have done above for PropertyInfo.

Please can someone give me some tips - can this be done via queries on the front-end or do I need to do something in the code?

Thanks in advance,

Any ideas please?

Tx, Kirsty
Aug 5, 2013 at 10:30 PM
Please can anyone help with this?
Aug 5, 2013 at 11:09 PM
You can do AND queries by adding groups.
Aug 6, 2013 at 12:19 AM
I am not sure how this works as I have implemented the above query using groups.
I thought when you added new group it adds an OR to the query not an AnD?

Tx u Kirsty
Aug 6, 2013 at 1:15 AM
Excuse me, you're right. Sounds like you will have to regroup the query a bit.
Aug 6, 2013 at 8:38 AM
Tx for replying. I just can't figure out how to do this.
Please can you let me know the following:-
  1. How do I get into the query code to write my own if I can't achieve what I want through the front-end?
  2. How can I add multiple queries into 1 projection page?
Tx u in advance