AnsweredAssumed Answered

Filtering portal with date range

Question asked by PeterDowns on Aug 3, 2011
Latest reply on Aug 10, 2011 by PeterDowns

Title

Filtering portal with date range

Post

Hi 
I have a layout attached to a table tasks. Nested in it is a portal displaying all records of the table tasks via a 2ndary copy of the table through the relationships section called tasks 2.

I have 2 global fields called g_startDate and g_FinishDate in table tasks and a field called Date_Start in tasks which is when the task actually starts. 

I have set up a script "dateRangeTasks" containing - 
Go to Portal Row [Select; First]
Enter Find Mode []
Set Field [Tasks 2::Date_Start ≥ Tasks::g_StartDate]
Set Field [Tasks 2::Date_Start  ≤ Tasks::g_FinishDate] 
Perform Find[] 

On the main layout I have set up 2 drop down calendars displaying data from the 2 global date fields The script is triggered on "OnObjectSave" on both date fields. The portal contains the Date_Start field. Before the filtering the portal is showing all the tasks correctly.

When I select a date (either start or finish) I get an error message - "No records match this criteria". and I know there are valid records that fit into the date range.

Any ideas
thanks in advance

Cheers

Peter

Outcomes