Calculations within Custom Field from Custom Item Field (Showing Item Category with Subtotal)

Calculations within Custom Field from Custom Item Field (Showing Item Category with Subtotal)

I am trying to do some template customisations and show a subtotal amount for all items 'from a category'

1)
I have added a Dropdown custom category field within items
API Name is now cf_category

2) 
I added a drop down custom field with

Category Name 1
API Name = cf_subtotal_of_category_name_1

Category Name 2
API Name = cf_subtotal_of_category_name_2

Category Name 3
API Name = cf_subtotal_of_category_name_3

3)
Within my Estimate Template I can show this Category Name by using the placeholder

${ESTIMATE.Item.CF.Category.Value}

4)
I created new subtotal fields for my category names which go into my template with placeholders between the 

standard ones..

%EstimateSubTotal%

${estimate.cf_subtotal_of_category_name_1}
${estimate.cf_subtotal_of_category_name_2}
${estimate.cf_subtotal_of_category_name_3}

%EstimateTotal%

Can someone please help me with the script to automate this and run calculations  ;

Add up all item amounts for Category Name 1 and show that value in
${estimate.cf_subtotal_of_category_name_1}

Add up all item amounts for Category Name 2 and show that value in  ${estimate.cf_subtotal_of_category_name_2}

Add up all item amounts for Category Name 3 and show that value in  ${estimate.cf_subtotal_of_category_name_3}


I hope this makes sense.
Thank you.







                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • Functions

                                                                      Functions

                                                                    • Meetups

                                                                      Meetups

                                                                    • Kbase

                                                                      Kbase

                                                                    • Resources

                                                                      Resources

                                                                    • Digest

                                                                      Digest

                                                                    • CRM Marketplace

                                                                      CRM Marketplace

                                                                    • MVP Corner

                                                                      MVP Corner

                                                                    





                                                                    




                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now