Client side script

Hi guys, 

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Set "Depends On" property of field_b to:

eval:doc.field_a

or, to toggle based on main form field's value

eval:parent.field_a

-Anand.

On Tue, Sep 9, 2014 at 1:51 PM, Nguyen Do Le Bao <na...@gmail.com> wrote:
Hi guys,

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF1P8C3%3DkNMVWBQqzu%2B0NT3kcrDm-28Z4Hrh1e9-HKj_KQ%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Open the doctype, open the field row and set "Depends On"


On 09-Sep-2014, at 1:51 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/1B21DF02-38CD-4214-B89F-53F544AA3B75%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Can you confirm again if it works. Cos I just tried several ways without any effect: 
eval:doc.field_a
eval:doc.field_a==0
eval:doc.field_a=='0'

field_a is a Check Field

Thank you!

On Tuesday, September 9, 2014 4:41:33 PM UTC+8, rushabh wrote:
Open the doctype, open the field row and set "Depends On"


On 09-Sep-2014, at 1:51 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9b1f798b-423a-485b-9902-eeee454680d6%40googlegroups.com.

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

On 10-Sep-2014, at 1:22 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Can you confirm again if it works.

Depends on is used in a lot of DocTypes and works. Check "Stock Entry"


Cos I just tried several ways without any effect: 
eval:doc.field_a
eval:doc.field_a==0
eval:doc.field_a=='0'

field_a is a Check Field

Thank you!

On Tuesday, September 9, 2014 4:41:33 PM UTC+8, rushabh wrote:
Open the doctype, open the field row and set "Depends On"


On 09-Sep-2014, at 1:51 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9b1f798b-423a-485b-9902-eeee454680d6%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/E50AED29-ED29-4FC3-9BA7-F702EBDA12CD%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Ok it works, but I think it only works on Normal Doctype, not with Child Table. 
Can you give me some example for Child Table as well ? 

Set "Depends On" property of field_b to:
eval:doc.field_a
or, to toggle based on main form field's value
eval:parent.field_a
If this works, it's great but not currently the case for Child Table.

On Wednesday, September 10, 2014 4:58:21 PM UTC+8, rushabh wrote:

On 10-Sep-2014, at 1:22 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Can you confirm again if it works.

Depends on is used in a lot of DocTypes and works. Check "Stock Entry"


Cos I just tried several ways without any effect: 
eval:doc.field_a
eval:doc.field_a==0
eval:doc.field_a=='0'

field_a is a Check Field

Thank you!

On Tuesday, September 9, 2014 4:41:33 PM UTC+8, rushabh wrote:
Open the doctype, open the field row and set "Depends On"


On 09-Sep-2014, at 1:51 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9b1f798b-423a-485b-9902-eeee454680d6%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8cc99474-e571-4194-97cd-c41d90de30b3%40googlegroups.com.

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

On 12-Sep-2014, at 9:35 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Ok it works, but I think it only works on Normal Doctype, not with Child Table. 
Can you give me some example for Child Table as well ? 

Why don't you find out :P

select parent, fieldname from tabDocField where depends_on is not null;



Set "Depends On" property of field_b to:
eval:doc.field_a
or, to toggle based on main form field's value
eval:parent.field_a
If this works, it's great but not currently the case for Child Table.

On Wednesday, September 10, 2014 4:58:21 PM UTC+8, rushabh wrote:

On 10-Sep-2014, at 1:22 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Can you confirm again if it works.

Depends on is used in a lot of DocTypes and works. Check "Stock Entry"


Cos I just tried several ways without any effect: 
eval:doc.field_a
eval:doc.field_a==0
eval:doc.field_a=='0'

field_a is a Check Field

Thank you!

On Tuesday, September 9, 2014 4:41:33 PM UTC+8, rushabh wrote:
Open the doctype, open the field row and set "Depends On"


On 09-Sep-2014, at 1:51 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9b1f798b-423a-485b-9902-eeee454680d6%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8cc99474-e571-4194-97cd-c41d90de30b3%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/B99A0C13-167C-49D9-97A7-12F2BC6042B5%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
haha ok my bad! 

On Friday, September 12, 2014 1:30:08 PM UTC+8, rushabh wrote:

On 12-Sep-2014, at 9:35 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Ok it works, but I think it only works on Normal Doctype, not with Child Table. 
Can you give me some example for Child Table as well ? 

Why don't you find out :P

select parent, fieldname from tabDocField where depends_on is not null;



Set "Depends On" property of field_b to:
eval:doc.field_a
or, to toggle based on main form field's value
eval:parent.field_a
If this works, it's great but not currently the case for Child Table.

On Wednesday, September 10, 2014 4:58:21 PM UTC+8, rushabh wrote:

On 10-Sep-2014, at 1:22 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Can you confirm again if it works.

Depends on is used in a lot of DocTypes and works. Check "Stock Entry"


Cos I just tried several ways without any effect: 
eval:doc.field_a
eval:doc.field_a==0
eval:doc.field_a=='0'

field_a is a Check Field

Thank you!

On Tuesday, September 9, 2014 4:41:33 PM UTC+8, rushabh wrote:
Open the doctype, open the field row and set "Depends On"


On 09-Sep-2014, at 1:51 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys, 

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9b1f798b-423a-485b-9902-eeee454680d6%40googlegroups.com.

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




Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8cc99474-e571-4194-97cd-c41d90de30b3%40googlegroups.com.

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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7f274598-64cf-48c8-bd8c-6513c72c9273%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Hi.

for child doctypes, you try to set eval:parent.field_a

-Anand.

On Fri, Sep 12, 2014 at 12:50 PM, Nguyen Do Le Bao <na...@gmail.com> wrote:
haha ok my bad!

On Friday, September 12, 2014 1:30:08 PM UTC+8, rushabh wrote:

On 12-Sep-2014, at 9:35 am, Nguyen Do Le Bao <na...@gmail.com> wrote:

Ok it works, but I think it only works on Normal Doctype, not with Child Table.
Can you give me some example for Child Table as well ?

Why don't you find out :P

select parent, fieldname from tabDocField where depends_on is not null;



Set "Depends On" property of field_b to:
eval:doc.field_a
or, to toggle based on main form field's value
eval:parent.field_a
If this works, it's great but not currently the case for Child Table.

On Wednesday, September 10, 2014 4:58:21 PM UTC+8, rushabh wrote:

On 10-Sep-2014, at 1:22 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Can you confirm again if it works.

Depends on is used in a lot of DocTypes and works. Check "Stock Entry"


Cos I just tried several ways without any effect:
eval:doc.field_a
eval:doc.field_a==0
eval:doc.field_a=='0'

field_a is a Check Field

Thank you!

On Tuesday, September 9, 2014 4:41:33 PM UTC+8, rushabh wrote:
Open the doctype, open the field row and set "Depends On"


On 09-Sep-2014, at 1:51 pm, Nguyen Do Le Bao <na...@gmail.com> wrote:

Hi guys,

Having a simple question but can't find an answer after searching ...
Using client script, to hide and unhide based on another field is as simple as: https://gist.github.com/anonymous/707697f105d287703d0e

Is there a way to do the same thing if the field is a subfield belong to Table Item ?



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0da483b5-707c-4029-9137-a889488525b5%40googlegroups.com.

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




Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9b1f798b-423a-485b-9902-eeee454680d6%40googlegroups.com.

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




Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8cc99474-e571-4194-97cd-c41d90de30b3%40googlegroups.com.

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



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7f274598-64cf-48c8-bd8c-6513c72c9273%40googlegroups.com.


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



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF2SXcvn8bYK_i0JOGz%3DF39t0P2RHhQhMNL8MGUmw6P7Yg%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
1 Like