Depends On

So i want use "depends on" in the expense claim form. I've created to fields Test which is a select list with A,B,C as options.
 Now i want the my field test2 to appear only when "B" is selected .
 For  that in Customize Form ive added to the Depends On field in test2 :   eval:doc.test=='B'

When I click update the green bar shows but no : Updated screens comes.Whats wrong?



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.
I tried a very similar set up, where in my custom field "test" was pulling data from another table and my "test2" field was an HTML type field set to display depending on the value of the "test" field.  I reported the same problem to WebNotes.  The console shows the following problem when trying to save the form: http://pastebin.com/xAcSMZ8s

On Thursday, January 2, 2014 4:11:43 PM UTC+8, Anirudh Singh wrote:
So i want use "depends on" in the expense claim form. I've created to fields Test which is a select list with A,B,C as options.
 Now i want the my field test2 to appear only when "B" is selected .
 For  that in Customize Form ive added to the Depends On field in test2 :   eval:doc.test=='B'

When I click update the green bar shows but no : Updated screens comes.Whats wrong?



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.
Property Setters do not work for Custom Fields at the moment. Will fix it in version 4



On Friday, January 3, 2014 6:50:07 AM UTC+5:30, lxnow wrote:
I tried a very similar set up, where in my custom field "test" was pulling data from another table and my "test2" field was an HTML type field set to display depending on the value of the "test" field.  I reported the same problem to WebNotes.  The console shows the following problem when trying to save the form: http://pastebin.com/xAcSMZ8s

On Thursday, January 2, 2014 4:11:43 PM UTC+8, Anirudh Singh wrote:
So i want use "depends on" in the expense claim form. I've created to fields Test which is a select list with A,B,C as options.
 Now i want the my field test2 to appear only when "B" is selected .
 For  that in Customize Form ive added to the Depends On field in test2 :   eval:doc.test=='B'

When I click update the green bar shows but no : Updated screens comes.Whats wrong?



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.
Thanks for the reply..........One more thing. Should it work if i do it for a pre defined field. Because i tried it and it didnt work.I mean it showed that it "Updated" but it didnt work as intended.



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.
There are multiple display rules that may be applied on a field.

To check why a field shows up or hides - Open the form, do your desired actions to get the state (select etc):

go to you console and try:

cur_frm.fields_dict[fieldname].get_status(true)




On Friday, January 3, 2014 2:27:33 PM UTC+5:30, Anirudh Singh wrote:
Thanks for the reply..........One more thing. Should it work if i do it for a pre defined field. Because i tried it and it didnt work.I mean it showed that it "Updated" but it didnt work as intended.



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.