How to create child table without affecting previous doctype

Hello @NCP ,
In activity cost page, as shown in following screenshot

we cant bulk assign activity type to employee. Each time we need to fill form. i.e. for 10 employees and 10 activity type, 10 employee * 10 Activity Type= 100 form we need to create. This is not practical and also time consuming.
How we can create child table, as attached in following screenshot.
02
We are using Frappe cloud and I am newbie for this technology. Please guide step by step.

Thanks

Hi @Shraddha33,

For that case, first, create a new child table doctype.
Add fields like activity type, billing rate, and costing rate in the table doctype.

After then the table adds in the Activity cost and checks it.

Thank You!

could you please guide me for above issue

Hi @Shraddha33,

  1. Create a child doctype and add fields.

  2. Add table in Customize Form - Activity Cost

Please set your table according to the section.

  1. Please check in activity cost doctype.

Check and use it. If comfortable so you can use it otherwise remove it.

Thank You!

1 Like

I created the same way you did. But when I used timesheet that time the values are not updated according to employees costing rate.

It’s just table view and it’s used for doctype only.

The costing rate with an employee does not link with the timesheet.
Otherwise, I can create separate activity costs for the individuate employees.

If you want to set total costing rate of the table costing

Then apply the server script.
DocType Event: Before Save

cr = set(d.costing_rate for d in doc.get("list_of_activities", []))
doc.costing_rate = sum(cr)

And also before that said.

Thank You!

1 Like