A comprehensive expense calculation system built on the ServiceNow platform that enables families to track, manage, and analyze daily expenses in a centralized location.
- Project Overview
- Features
- Prerequisites
- Installation & Setup
- Project Structure
- Configuration
- Business Rules
- Testing
- Usage
- Benefits
- Screenshots
- Contributing
- License
The Calculating Family Expenses using ServiceNow project is designed to provide families with a robust, automated expense management system. Built on the ServiceNow platform, this solution leverages the platform's powerful features including Business Rules, Forms and Lists, and Data Management capabilities to create a seamless financial tracking experience.
ServiceNow Application Developer
- Business Rules
- Forms and Lists
- Data Management
- ServiceNow Platform Development
- Expense Categorization: Organize expenses by type and category
- Budget Setting and Monitoring: Set and track family budgets
- Real-time Tracking: Monitor expenses as they occur
- Daily Expense Aggregation: Automatic rollup of daily expenses to family level
- Automated Updates: Business rules automatically update family expenses when daily expenses are added
- Reporting and Analysis: Comprehensive reporting capabilities for financial insights
- User-friendly Interface: Intuitive forms and related lists for easy data entry
- Scalability: Supports families with varying financial complexities
- ServiceNow instance (Personal Developer Instance or higher)
- Admin rights to create tables and configure applications
- Basic understanding of ServiceNow platform
- Knowledge of JavaScript for Business Rules
- Set up a ServiceNow instance
- Create a new Update Set for project configuration
- Name the Update Set: "Family Expenses Management System"
- Navigate to System Definition > Tables
- Create a new table:
u_family_expenses - Configure the following fields:
- Date (Date field)
- Amount (Currency/Decimal field)
- Expense Details (String/Text field)
- Configure Number field as Auto-number
- Set up form layout for user-friendly input
- Create another table:
u_daily_expenses - Configure the following fields:
- Date (Date field)
- Expense (Currency/Decimal field)
- Comments (String field)
- Family Reference (Reference field to u_family_expenses)
- Configure Number field as Auto-number
- Set up form layout
- Create relationship between Family Expenses and Daily Expenses tables
- Configure Related List on Family Expenses to display linked Daily Expenses
- Set up proper query conditions for the relationship
Configure auto-numbering for both tables to ensure unique identifiers:
- Family Expenses form: Display Date, Amount, and Expense Details
- Daily Expenses form: Display Date, Expense, Comments, and Family Reference
Purpose: Automatically update or create Family Expenses records when Daily Expenses are added.
When: After Insert/Update on Daily Expenses table
Script:
function executeRule(current, previous /*null when async*/) {
var FamilyExpenses = new GlideRecord('u_family_expenses');
FamilyExpenses.addQuery('u_date', current.u_date);
FamilyExpenses.query();
if(FamilyExpenses.next()) {
// Update existing family expense record
FamilyExpenses.u_amount += current.u_expense;
FamilyExpenses.u_expense_details += " > " + current.u_comments + ": Rs." + current.u_expense + "/-";
FamilyExpenses.update();
} else {
// Create new family expense record
var NewFamilyExpenses = new GlideRecord('u_family_expenses');
NewFamilyExpenses.u_date = current.u_date;
NewFamilyExpenses.u_amount = current.u_expense;
NewFamilyExpenses.u_expense_details = " > " + current.u_comments + ": Rs." + current.u_expense + "/-";
NewFamilyExpenses.insert();
}
}Purpose: Filter related Daily Expenses based on date matching.
Script:
function refineQuery(current, parent) {
current.addQuery('u_date', parent.u_date);
current.query();
}-
Daily Expense Addition:
- Add daily expenses and verify automatic aggregation under Family Expenses
- Verify that amounts are correctly summed up
-
Related List Functionality:
- Check that related lists display correctly
- Verify filtering works properly
-
Auto-numbering:
- Validate that both tables generate unique numbers automatically
-
Expense Details Update:
- Confirm that expense details and totals are updated correctly
- Verify the concatenation of expense descriptions
- Create daily expenses for the same date
- Verify they roll up to a single family expense record
- Add expenses for different dates and verify separate family expense records are created
- Navigate to Daily Expenses table
- Click New to create a new record
- Fill in the required fields:
- Date
- Expense amount
- Comments describing the expense
- Save the record
- Navigate to Family Expenses table
- View aggregated expenses by date
- Use the related list to see detailed daily expenses
- Review expense details for comprehensive breakdown
- Centralized Expense Tracking: Single platform for all family expense management
- Automated Aggregation: Reduces manual effort in calculating daily totals
- Easy Reporting: Built-in ServiceNow reporting capabilities for financial analysis
- Error Reduction: Automated calculations minimize human errors
- Financial Awareness: Enhanced visibility into family spending patterns
- Scalability: Easily adaptable to different family sizes and complexity levels
- Data Integrity: ServiceNow platform ensures data consistency and security
The project includes visual documentation of each step:
- Instance Creation: Initial ServiceNow setup
- Table Creation: Family and Daily Expenses table configuration
- Form Design: User interface layouts
- Relationship Setup: Table relationships and related lists
- Business Rules: Automation logic implementation
- Testing Results: Validation of functionality
Family Expenses System/
βββ Tables/
β βββ u_family_expenses
β βββ u_daily_expenses
βββ Business Rules/
β βββ Family Expenses Update Rule
β βββ Relationship Refinement Rule
βββ Forms/
β βββ Family Expenses Form
β βββ Daily Expenses Form
βββ Related Lists/
β βββ Daily Expenses on Family Expenses
βββ Documentation/
βββ Setup Screenshots
βββ Configuration Guide
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details.
Click Here : https://drive.google.com/file/d/1eyIwk0so6kAx2s3BQMWPw1cj3UiQ1zXk/view?usp=sharing
- ServiceNow Community for platform documentation
- ServiceNow Developer Program for resources and tools
- Family financial management best practices
For support and questions:
- Create an issue in this repository
- Contact the development team
- Refer to ServiceNow community forums
Note: This project demonstrates the power of ServiceNow as a customizable platform beyond traditional IT Service Management, showcasing its capabilities in financial management and family budgeting applications.








