I have a fun problem ahead of me.
So, I have built a solution for my company that basically handles unstructured information. It works like this:
A user creates a Task, the Task is in reality just a collection of Tags. These Tags can hold any type of value.
So, for example, if a user wants to create a Task that holds a string (think Title) and two date fields (think Start Date and Due Date), the user can create a template for this, and then create as many Tasks as they want.
So in this case, the user might see a list that looks like this after they have created some Tasks:
| Title | Start Date | Due Date |
|---|---|---|
| Go to Doctor | 2001-01-01 | 2001-02-01 |
| Call boss | 2005-01-01 | 2005-02-01 |
Now, I want to create a ruleset for the user, for example, create some rules to check that "Due Date" is in the future compared to "Start Date".
Since the solution has no idea what data is stored, the possibilities are endless.
I do have a pretty good idea of how to create this ruleset but I would love some input before I start.
The way I figure is to build some rules (in reality some type of calculated field) that the user can apply to the Task. For example, a rule that looks like this: if(InternalFieldA > InternalFieldB) If the check is true, everything is fine, if the check is false, throw an error.
But I'm not sure what the best approach should be.
Any tips, tricks?