Using Depends On

I want to make a field appear only if the field "item_group" is Software. I tried using the following in the Depend on Field: eval:doc.item_group=='software' and it doesn't work. What am I doing wrong here?



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/ff2727c9-6ac4-4c2f-8bf3-3f438e8b99f2%40googlegroups.com.

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

Are you trying to add depends_on in the child table?

I don't think doc works in the child table...

If you are on version 4, use this to access the current child doc

$('.grid-row-open:visible').data("grid_row").doc

so your script should be

$('.grid-row-open:visible').data("grid_row").doc.item_group=="software"


On 22-May-2014, at 12:32 am, Nate Gallery <ga...@gmail.com> wrote:

I want to make a field appear only if the field "item_group" is Software. I tried using the following in the Depend on Field: eval:doc.item_group=='software' and it doesn't work. What am I doing wrong here?



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/ff2727c9-6ac4-4c2f-8bf3-3f438e8b99f2%40googlegroups.com.

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




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0EF25D15-7696-4BB5-BA0F-83D278872754%40gmail.com.

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