Database vs Expression Rules

Hi,

 

I am working on a project to display a calender view for tasks assigned between two dates(Start Date and End Date are available in the database). I have 2 solutions for the same. Can you suggest the best approach.

 

Solution 1 : Using Expression Rules

Idea is to to show the calender view for the tasks for a person between two dates. write an expression rule to :

  1. Fetch the tasks for that calender month.
  2. Using some loop/other functions create individual entries for every calender day for every individual.
  3. Pass the data to the calender interface as a multiple CDT.
  4. display on the calender interface.

Solution 2 : Using database trigger

  1. After creating a task and inserting in the database.
  2. Fetch the start date,end data and the individual. Create a trigger which would write into another table(call it calender table) and create individual entries and insert into a secondary table which would hold,(date and individual).
  3. write a query entity to fetch the details and show the data in the calender interface.

Looking for suggestions.

  Discussion posts and replies are publicly visible