How to hide child table fields?

Hello,

    Scenario:  
                 I have two fields in child table first one is select list named as  commission_rules and another one is data field named as group.

    What I want to Do?:
                I want to hide/unhide group field on change of commission_rules.

    Ways I have tried:

                    1. cur_frm.fields_dict["payment_details"].grid.set_column_disp('group', false):
                     Effect:  Field gets hide but row get back to inlist view format

                   
                    2. In child table's depend on field - eval:doc.commission_rules== value
                    Effect: nothing 




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

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

I think the depend on property should work for you. Like the way you did it but change your statement to something like eval: doc.group=='commission_rulesValue'.

Kind regards,
Kat.


On Wednesday, January 15, 2014 11:18:48 AM UTC+2, saurabh palande wrote:
Hello,

    Scenario:  
                 I have two fields in child table first one is select list named as  commission_rules and another one is data field named as group.

    What I want to Do?:
                I want to hide/unhide group field on change of commission_rules.

    Ways I have tried:

                    1. cur_frm.fields_dict["payment_details"].grid.set_column_disp('group', false):
                     Effect:  Field gets hide but row get back to inlist view format

                   
                    2. In child table's depend on field - eval:doc.commission_rules== value
                    Effect: nothing 




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

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

Does anyone have a solution to this?

Even I am trying to hide some child table fields based on the value of the parent. But I am unable to find a way to do the same.

use eval:parent.fieldname

1 Like

Thanks works like a Charm