Hi!
I’m developing an app that uses child DocTypes, but with sometimes quite a bit of fields.
Only having them in the table of the parent DocType is a bit cumbersome. I’ve seen the “edit” button next to the row and I expected it to open a modal where I can manage the complete child DocType entry, but it doesn’t do anything.
Could that be a bug or am I understanding something wrong here? Or do I need to setup something else?
Thanks!
Dennis
When you click the pencil icon in a child table row, it should open a dialog with all editable fields. If your pencil icon is not doing this, it suggests a misconfiguration.
In the child doctype there is a setting checkbox “Editable Grid”. If you disable this, clicking any field in the row will open the same dialog box that should’ve opened via the pencil icon.
Thanks. Disabling “Editable Grid” does nothing at all as well when I click the row. I guess it’s some hickup in the DocTypes, because I was kinda rewriting the structure after they’ve already been created and had data.
I’ll recreate the DocTypes and check if the error occurs again.
Hm. No, didn’t work. And now I see, that I get a stack trace in the browser console:
Uncaught TypeError: df is undefined
get_field_display_status http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:28898
refresh http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:35173
refresh_input http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:35935
refresh http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:30241
attach_doc_and_docfields http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:16635
refresh http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:16523
render http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:33415
show_form http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:34547
toggle_view http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:34530
open_form_button http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:33803
dispatch http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2841
handle http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2729
add http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2759
on http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2703
each http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:231
each http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:119
on http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2702
on http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:3174
add_open_form_button http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:33802
render_row http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:33777
make http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:33559
GridRow http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:33540
render_result_rows http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:35231
refresh http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:35192
refresh_input http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:35935
refresh http://event-manager-dev:8000/assets/frappe/dist/js/controls.bundle.XZZCFC7H.js:30241
attach_doc_and_docfields http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:16635
refresh http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:16523
refresh_fields http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:7002
render_form http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:6958
promise callback*frappe.run_serially/< http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:15828
run_serially http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:15826
render_form http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:6955
initialize_new_doc http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:6933
promise callback*initialize_new_doc http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:6930
trigger_onload http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:6915
refresh http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:6835
render http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:760
fetch_and_render http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:746
callback http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:27450
callback http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:18989
200 http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:19030
call http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:19185
fire http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1735
fireWith http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1821
done http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:5448
callback http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:5628
send http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:5638
ajax http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:5386
call http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:19167
call http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:19009
with_doc http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:27442
with_doc http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:27435
fetch_and_render http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:735
show_doc http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:731
make_and_show http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:701
make http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:686
with_doctype http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:27373
make http://event-manager-dev:8000/assets/frappe/dist/js/form.bundle.WY5JL5WO.js:683
show http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:31271
render_page http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:24030
render http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:24017
route http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:23922
set_route http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:46263
startup http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:46160
Application http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:46141
start_app http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:46125
<anonymous> http://event-manager-dev:8000/assets/frappe/dist/js/desk.bundle.4BMNNLXQ.js:46137
mightThrow http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1922
process http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1957
setTimeout handler*node_modules/jquery/dist/jquery.js/</Deferred/then/resolve/< http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1982
fire http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1735
fireWith http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1821
fire http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1827
fire http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1735
fireWith http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1821
ready http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2102
completed http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2109
js http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:2114
js http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:37
js http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:46
__require2 http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:16
<anonymous> http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:19498
<anonymous> http://event-manager-dev:8000/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:21430
Apparently it can’t find a specific field.
Ahhh, I got it. I’ve been stacking two childs onto another and I guess, that’s what the tree option is for, right?
So you can only have one parent with one child but not another child underneath that child.
Hm. Is there any documentation about the tree option? I find none and it looks complicated…
Yes, you can’t nest child tables.
The tree structure allows you to create parent child relationships between two documents of the same Doctype. For reference see Item Group or Department Doctypes in ERPNext.
1 Like
Yes, the tree is the right way to implement a document hierarchy in Frappe, but if you simply want to store a distinct structured dataset inside child table entries, refer to the workaround here: Is there anyway I can add child table inside a child table?
1 Like
Check the console for errors or missing assets