<div dir="ltr">At last it works. I created another view to list reservations by dates, and I called this inside context filter to avoid selected nodes.<div><br></div><div>thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-20 11:40 GMT+01:00 Lluís Forns <span dir="ltr"><<a href="mailto:enboig@gmail.com" target="_blank">enboig@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I use entity reference to connect them.<div><br></div><div>I thing a way to achieve this is adding a context filter for NID and using PHP to select all rooms occupied and remove them. I have a view to select reservations by date, I could call it using PHP, apply the date filter, and get the nids to remove.</div><div><br></div><div>My problem now is how to call a view programatically just to get the nids.</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">2015-01-20 6:20 GMT+01:00 muhammed naushad <span dir="ltr"><<a href="mailto:naushunaushad24@gmail.com" target="_blank">naushunaushad24@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I would recommend you to use custom module. </div><div><br></div><div>If you want to use the view please mention how you connect these two content types?</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Jan 19, 2015 at 6:37 PM, Lluís Forns <span dir="ltr"><<a href="mailto:enboig@gmail.com" target="_blank">enboig@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>I have a site with 2 content types: rooms and reservations. I want to list all the rooms without a reservation for an interval, and also for services, capacity, ....<br></div><div><br></div><div>I tried creating a view with a PHP filter to check free rooms, but then if the page lists 10 rooms, sometimes there are 7, 2, or 0; because the filter lists the 10 rooms and after remove the occupied ones.<br clear="all"><div><br></div><div>I have tried to create a "subview" filter to select nodes "not in (view of occupied rooms); but I haven't find a way to do so.</div><div><br></div><div>Any idea of how to accomplish this?</div><div><br></div><div>thanks</div><span><font color="#888888">-- <br><div>*Ser freak no és imprescindible per ser informàtic, però ajuda.<br></div>
</font></span></div></div>
<br></div></div><span>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Thanks<br>Muhammed Naushad<br>Web Developer<br><a href="tel:%2B971529187882" value="+971529187882" target="_blank">+971529187882</a>,<a href="tel:%2B919744663973" value="+919744663973" target="_blank">+919744663973</a><br><a href="http://stunningspider.com" target="_blank">http://stunningspider.com</a></div></div>
</font></span></div>
<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><div><div><div class="h5">*Ser freak no és imprescindible per ser informàtic, però ajuda.<br></div></div><span class="">*La vida no ha de ser feliç, ha de ser plena.<br>*Abans d'imprimir aquest missatge, pensa en el medi ambient.</span></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">*Ser freak no és imprescindible per ser informàtic, però ajuda.<br>*La vida no ha de ser feliç, ha de ser plena.<br>*Abans d'imprimir aquest missatge, pensa en el medi ambient.</div>
</div>