<div dir="ltr">Thanks! for the update Alan, We will review to include this in the documentation.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 25, 2020 at 3:34 PM Alan Lord <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Just to finish this thread you can also use ORDER BY clauses in this <br>
extra argument, e.g.<br>
<br>
> $query = "SELECT * FROM SalesOrder";<br>
> $limit = "ORDER BY subject LIMIT 100, 200";<br>
> $moreRelatedStuff = vtws_query_related($query, $accWSId, 'SalesOrder', $current_user, $limit);<br>
<br>
Hope that helps.<br>
<br>
Al<br>
<br>
<br>
On 25/08/2020 10:52, Alan Lord wrote:<br>
> I wrote too soon ;-)<br>
> <br>
> <a href="https://code.vtiger.com/vtiger/vtigercrm/issues/1464" rel="noreferrer" target="_blank">https://code.vtiger.com/vtiger/vtigercrm/issues/1464</a><br>
> <br>
> Some documentation would have been helpful guys...<br>
> <br>
> Al<br>
> <br>
> <br>
> On 25/08/2020 10:47, Alan Lord wrote:<br>
>> This is becoming a right PITA.<br>
>><br>
>> <a href="https://code.vtiger.com/vtiger/vtigercrm/issues/1464" rel="noreferrer" target="_blank">https://code.vtiger.com/vtiger/vtigercrm/issues/1464</a><br>
>><br>
>> using vtws_retrieve_related, or vtws_query_related, it is not possible <br>
>> to get more than the first 100 records...<br>
>><br>
>> Al<br>
>><br>
>><br>
>> On 13/07/2020 12:24, Uma S wrote:<br>
>>> Thanks! for the notification Alan. We will review this post release.<br>
>>><br>
>>> On Fri, Jul 10, 2020 at 2:20 PM Alan Lord <<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a> <br>
>>> <mailto:<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>>> wrote:<br>
>>><br>
>>>     anyone?<br>
>>><br>
>>>     On 07/07/2020 13:30, Alan Lord wrote:<br>
>>>      > I'm looking at the vtws_retrieve_related and the<br>
>>>     vtws_query_related apis.<br>
>>>      ><br>
>>>      > vtws_retrieve_related is OK - but it is limited in the sense <br>
>>> you get<br>
>>>      > back everything.<br>
>>>      ><br>
>>>      > I would like to, maybe, add LIMIT and/or ORDER BY clauses...<br>
>>>      ><br>
>>>      > If I keep the query extremely simple, e.g.<br>
>>>      ><br>
>>>      >> $query = "SELECT * FROM HelpDesk";<br>
>>>      >> $data = vtws_query_related($query, '11x566', 'HelpDesk',<br>
>>>     $current_user);<br>
>>>      >> print_r($data);<br>
>>>      ><br>
>>>      > Then it works - but I can't add an ORDER BY clause. I couldn't <br>
>>> add a<br>
>>>      > simple WHERE clause either. The VTQL_Parser threw an exception no<br>
>>>     matter<br>
>>>      > what I tried.<br>
>>>      ><br>
>>>      > Is it possible to use an ORDER BY clause? Can you provide some<br>
>>>      > documentation and/or examples? If not - what would a Marketplace<br>
>>>     module<br>
>>>      > have to do? Would it have to iterate/post process *all* the <br>
>>> returned<br>
>>>      > data to effectively introduce ordering and/or limits?<br>
>>>      ><br>
>>>      ><br>
>>>      > Also, I note that in my simple query above, unlike vtws_query, <br>
>>> if I<br>
>>>      > include the semi-colon in the query the query fails. This isn't<br>
>>>      > consistent - in vtws_query you MUST terminate the query with a <br>
>>> ";".<br>
>>>      > (I expect it is the preg_match test in QueryRelated.php that is<br>
>>>     causing<br>
>>>      > this.)<br>
>>>      ><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> <a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
>><br>
> <br>
> <br>
> _______________________________________________<br>
> <a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div></div>