Return query

Hello All,
   I have added return query to a link field. when i type “abc” in filter it should display values containing string “abc” but it shows all values . If i remove return query it works fine for key searching. Is there any thing i miss.

Regards,
Gangadhar kadam



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9626acbd-785f-49da-9cdc-88c418b6c504%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Gangadhar,

Like I said earlier, our magic eye system is not working. Please share what query you are using. The more information you give us, the faster we (or anyone) can reply to your question. Hope you keep this in mind for future queries on the forum.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 23-May-2013, at 10:44 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
   I have added return query to a link field. when i type "abc" in filter it should display values containing string "abc" but it shows all values . If i remove return query it works fine for key searching. Is there any thing i miss.

Regards,
Gangadhar kadam



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9626acbd-785f-49da-9cdc-88c418b6c504%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7973D37A-F93D-4AA8-91F7-45272BA84C27%40erpnext.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Sorry sir,
I am using following query

cur_frm.fields_dict['group_opm'].get_query = function(doc, cdt, cdn) {
return "select p.name from tabProfile p,tabUserRole u where u.parent=p.name and u.role='Group Operations Manager'";
}

I am using this query to filter profile having Group operation manager. If I use this query, I get correct result of query , if I type "abc" then it should display profile having Group operation manager role, but it displays all profiles having Group operation manager role .If i remove this script filter works correctly. Should i tried this also

cur_frm.fields_dict['group_opm'].get_query = function(doc, cdt, cdn) {
return "select p.name from tabProfile p,tabUserRole u where u.parent=p.name and u.role='Group Operations Manager' and p.name like ' %"+doc.group_opm+"%' ";
}

Thank you.


On 23 May 2013 10:47, Rushabh Mehta <rm...@gmail.com> wrote:
Gangadhar,

Like I said earlier, our magic eye system is not working. Please share what query you are using. The more information you give us, the faster we (or anyone) can reply to your question. Hope you keep this in mind for future queries on the forum.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 23-May-2013, at 10:44 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
I have added return query to a link field. when i type "abc" in filter it should display values containing string "abc" but it shows all values . If i remove return query it works fine for key searching. Is there any thing i miss.

Regards,
Gangadhar kadam



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9626acbd-785f-49da-9cdc-88c418b6c504%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.







You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7973D37A-F93D-4AA8-91F7-45272BA84C27%40erpnext.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.





--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune


P SAVE TREES - Please consider the environment before printing this email.

SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping prevent global warming by reducing consumption of power... ARE YOU?



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAPS1ps%2Bw4s6e4uFMVrQh5GNgAzONnka9Lk6k5N4Fd0NmM9jgHw%40mail.gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Dear Gangadhar,

We have started shifting the get queries to server side. If you have access to modifying server side code, you can use this system.
Check cost_center get query in journal_voucher.js and its called method "get_cost_center_list" in accounts/utils.py

Else your query should be something like:
"select p.name from `tabProfile` p, `tabUserRole` u where u.parent=p.name and u.role=\"Group Operations Manager\" \
and %(key)s like \"%s%%\" "

Thanks,
Anand.


On 23-May-2013, at 1:12 PM, गंगाधर कदम <em...@gmail.com> wrote:

Sorry sir,
   I am using following query

cur_frm.fields_dict['group_opm'].get_query = function(doc, cdt, cdn) {
  return "select p.name from tabProfile p,tabUserRole u where u.parent=p.name and u.role='Group Operations Manager'";
 }

I am using this query to filter profile having Group operation manager. If I use this query, I get correct result of query , if I type "abc" then it should display profile having Group operation manager role, but it displays all profiles having Group operation manager role .If i remove this script filter works correctly. Should i tried this also

cur_frm.fields_dict['group_opm'].get_query = function(doc, cdt, cdn) {
  return "select p.name from tabProfile p,tabUserRole u where u.parent=p.name and u.role='Group Operations Manager' and p.name like ' %"+doc.group_opm+"%' ";
 }

Thank you.


On 23 May 2013 10:47, Rushabh Mehta <rm...@gmail.com> wrote:
Gangadhar,

Like I said earlier, our magic eye system is not working. Please share what query you are using. The more information you give us, the faster we (or anyone) can reply to your question. Hope you keep this in mind for future queries on the forum.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 23-May-2013, at 10:44 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
   I have added return query to a link field. when i type "abc" in filter it should display values containing string "abc" but it shows all values . If i remove return query it works fine for key searching. Is there any thing i miss.

Regards,
Gangadhar kadam



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9626acbd-785f-49da-9cdc-88c418b6c504%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7973D37A-F93D-4AA8-91F7-45272BA84C27%40erpnext.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune

SAVE TREES - Please consider the environment before printing this email.
SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping  prevent global warming by reducing consumption of power... ARE YOU?



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAPS1ps%2Bw4s6e4uFMVrQh5GNgAzONnka9Lk6k5N4Fd0NmM9jgHw%40mail.gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/82D6323F-92E8-4980-A058-ADF501B2548B%40erpnext.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.