Post

2 followers Follow
0
Avatar

Visualize data validation : Warn user but allow edit

We were having trouble with validation rules being too invasive, especially for some custom objects we developed.  Validation prevents an edit from being made; we just wanted a visual indicator for the end user that some of their data might have issues.

I spent time combing through the success site with no luck, so thought I'd share our approach for other folks.  Our users love it.

  1. We wanted to be able to identify certain conditions on a custom object, and also on a project
  2. We wanted to types of warning to a user: 'warnings' indicate field values that *might* be a problem; 'errors' indicate field values that we know affect the accuracy of key metrics, calculated fields, etc.
  3. We wanted a strong visual indicator to the user that a project or custom object record was 'suspect', but did NOT want to prevent data changes.

Approach:

1. Create a custom field that evaluates possible warning conditions and generates a score.  Example:

IF(some condition = TRUE, 1, 0) + IF(somecondition2 = TRUE, 1, 0)...

2. Create a status field that renders as a stoplight (Red, Yellow, Green).  Red indicates Errors (or warnings and errors), Yellow indicates Warnings but no Errors, Green indicates zero warnings or errors.

3. Create a custom panel that mimics the same validation rules in the custom fields for the warning/error scores, and gives the user specific feedback on all conditions.  Here's a sample from our 'product' object.

The custom panel is using w3.css and html to create the error bars, and integrates clarizen formulas to render the names of the fields with issues.  So, error counts, bars, colors and list of issues all update dynamically when any field is edited.  

I hope this approach is useful for some other folks.

Todd Tetreault Answered

Please sign in to leave a comment.

1 comment