Have custom field in Site add up values of cost assigned to each circuit #9419
Answered
by
mtinberg
ben-marquardt-tfs
asked this question in
Q&A
Replies: 2 comments 2 replies
-
It's not possible for custom fields to work this way without writing additional code, you could create a Netbox Report which collects all the per-circuit custom field data and shows the Site totals though, or use an external script over the API to both calculate the totals you want, but also populate a custom field on Site with the calculated data.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: benmarquardtTFS ***@***.***>
Sent: Tuesday, May 24, 2022 1:46 PM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Have custom field in Site add up values of cost assigned to each circuit (Discussion #9419)
Hi, I am new to Netbox and am trying to figure out if it is possible to have a custom field of a cost for each circuit and then have another custom field at the site level that adds up the costs of all the circuits associated with this site.
For example, if there are two circuits:
Circuit A has a cost of 10
Circuit B has a cost of 20
Both are in Site 1
Is it possible to have custom fields that automatically add up the cost so the custom field on Site 1 has a cost of 30?
Thanks for any help!
—
Reply to this email directly, view it on GitHub<#9419>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM5TCYNRYA2XB3BA7X3VLUPZVANCNFSM5W2RAM2A>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
ben-marquardt-tfs
-
I don't have a recommendation on that front, both are useful skills that you will probably end up wanting to use, so if you think you have other near-term goals to write Reports then learn that first, or if you want to do bulk programmatic changes, import/export, interface with other systems, then learning the REST API first makes sense. Either way the skill will pay off.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: benmarquardtTFS ***@***.***>
Sent: Tuesday, May 24, 2022 3:47 PM
To: netbox-community/netbox ***@***.***>
Cc: Mark Tinberg ***@***.***>; Comment ***@***.***>
Subject: Re: [netbox-community/netbox] Have custom field in Site add up values of cost assigned to each circuit (Discussion #9419)
Thanks! This may be a tough question for you to answer, but as someone who is new to Netbox it is hard for me to figure out the easiest way to go about this. Would you say writing an external script over the API or using a Netbox Report would be the best solution? I can of course try both of them but I am wondering where you would recommend I start.
—
Reply to this email directly, view it on GitHub<#9419 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM2QQQX5DNFJWO2RCFLVLU575ANCNFSM5W2RAM2A>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am new to Netbox and am trying to figure out if it is possible to have a custom field of a cost for each circuit and then have another custom field at the site level that adds up the costs of all the circuits associated with this site.
For example, if there are two circuits:
Circuit A has a cost of 10
Circuit B has a cost of 20
Both are in Site 1
Is it possible to have custom fields that automatically add up the cost so the custom field on Site 1 has a cost of 30?
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions