{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":27636,"path":"it-business-management/project-workspace/configure-widget-project-financials.md","title":"Configure a widget for project financial metrics","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure a widget for project financial metrics\n\nConfigure a widget to view and track the financial metrics of a project on the **Financials** tab of the Project Workspace page.\n\n**Important:**\n\nClassic Project Workspace is being prepared for future deprecation. It will be hidden and no longer available for installation but will continue to be supported. For details, see the [Deprecation Process \\[KB0867184\\]](https://hi.service-now.com/kb_view.do?sysparm_article=KB0867184) article in the Now Support knowledge base. Use new Project Workspace with enhanced UI to help you efficiently manage your projects.\n\n## Before you begin\n\nRole required: pps\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Project Administration** &gt; **Widgets**.\n\n2.  Click **New**.\n\n3.  On the form, fill in the fields.\n\n<table id=\"table_osc_b4b_xhc\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nUnique name for the widget.\n\n</td></tr><tr><td>\n\nScripted\n\n</td><td>\n\nOption for indicating the value on the widget is from a code script.By default, this option is selected and is read-only.\n\n</td></tr><tr><td>\n\nShow Label\n\n</td><td>\n\nOption for displaying either the label or the color indicator.If you clear the check box, the **Color** field appears and you can set the color.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nOption for indicating the status of the widget.Only active widgets can be shown on the **Financials** tab of the Project Workspace.\n\n</td></tr><tr><td>\n\nParent widget\n\n</td><td>\n\nWidget that is the parent of the current widget.The current widget displays in the Child widgets related list of the selected widget.\n\n You can add a maximum of three child widgets for a parent widget.\n\n</td></tr><tr><td>\n\nFormatter required\n\n</td><td>\n\nOption for specifying whether a currency formatter is required for the widget.\n\n</td></tr><tr><td>\n\nScript\n\n</td><td>\n\nCode script that returns a requested metric value that is displayed on the widget.\n\n In the script, use the context and filter objects. The context object contains all of the project financial fields, such as capex\\_costs, opex\\_costs, and budget\\_cost.\n\n The following sample script returns the Estimate At Completion metric value of a project to appear on the widget.\n\n ```\nvar context = JSON.parse(context);\nvar filter = context.filters;\n\nvar now_GR = new GlideRecord('pm_project');\ngr.addEncodedQuery(filter['pm_project']);\ngr.query();\nif(gr.next())\n\tgr.getValue('forecast_cost');\nCollapse\n```\n\n</td></tr><tr><td>\n\nShort description\n\n</td><td>\n\nDescription of the widget.\n\n</td></tr></tbody>\n</table>\n## What to do next\n\n[Associate the widget to the Project table](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-business-management/project-workspace/associate-widget-to-project.md).\n\n-   **[Associate a widget to the Project table](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-business-management/project-workspace/associate-widget-to-project.md)**  \nAfter you configure a widget, associate it with the Project table to show the financial data of a project.\n\n**Parent Topic:**[View and manage project financial plans](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-business-management/project-workspace/view-plan-financials-in-project-workspace.md)\n\n"}}