{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":25970,"path":"it-asset-management/software-asset-management/custom-license-example-script.md","title":"Custom license metric example script","bundle":null,"doc_type":null,"release":"australia","body":"\n# Custom license metric example script\n\nThe following is an example of a custom license metric script.\n\n**Note:** This example is for demo purposes only and is not meant to be used for actual compliance scenarios.\n\n```\n<script><![CDATA[getRightsForDevice();\nfunction getRightsForDevice(){\nvar rightsForDevice = -1;\n\tvar deviceRecord = new GlideRecord('cmdb_ci_computer');\n\tif(deviceRecord.get(entity)){\n\t\trightsForDevice = deviceRecord.getValue('disk_space');\n\t}\n\treturn rightsForDevice;\n}]]></script>\n```\n\n**Parent Topic:**[Add a custom license metric](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-asset-management/software-asset-management/add-custom-license-metric.md)\n\n"}}