EACRMDevReqPadLeftRelativeWeight
This document was generated using Claude.ai
Overview
Formats the relative weight field in CRM development requests by padding it with leading zeros to a specified length. Ensures consistent numeric formatting for prioritization, sorting, or display purposes in development request management.
When This Action Runs
Manual execution for standardizing relative weight values in development requests, typically used during data cleanup, import processes, or when consistent formatting is required for reporting and prioritization.
How It Works
- Determines padding length - Uses specified parameter value or defaults to 4 characters
- Checks field existence - Verifies that the relative weight field contains a value
- Converts to integer - Parses the existing relative weight value as an integer
- Applies left padding - Adds leading zeros to reach the specified total length
- Updates field - Replaces the original relative weight with the padded version
Parameters
Parameter 1: Length to Pad (Optional) - Total character length for the padded relative weight (default: 4)
Usage Examples
With default padding (4 characters):
- Original: "5" → Result: "0005"
- Original: "12" → Result: "0012"
- Original: "100" → Result: "0100"
With custom padding (6 characters):
- Original: "5" → Result: "000005"
- Original: "123" → Result: "000123"
Database Tables Affected
- CRMDevelopmentRequest - Updates the relative weight field with padded formatting
Important Warnings
⚠️ Field Requirements
- Action only processes entities that have a non-empty relative weight field
- Empty or null relative weight fields are skipped without error
- Relative weight must contain a valid integer value for conversion
⚠️ Data Type Conversion
- Existing relative weight value is parsed as integer before padding
- Non-numeric values in relative weight field will cause conversion errors
- Action assumes relative weight contains only numeric characters
⚠️ Padding Behavior
- Padding always adds leading zeros to reach the specified length
- If existing value is already longer than padding length, no truncation occurs
- Default padding length is 4 characters if no parameter is provided
⚠️ Field Value Changes
- Original relative weight values are permanently replaced with padded versions
- Change affects display, sorting, and any comparisons based on the field
- Consider impact on existing reports or integrations that use relative weight
⚠️ Formatting Consistency
- Use same padding length across all development requests for consistency
- Different padding lengths may cause sorting or display issues
- Consider running on all related records simultaneously
⚠️ Use Case Limitations
- Primarily useful for numeric prioritization systems
- May not be appropriate for relative weights using decimal values
- Text-based relative weight systems may not benefit from this formatting
Module: crm
Full Class Name: com.namasoft.modules.crm.domain.entities.EACRMDevReqPadLeftRelativeWeight