I have a process backed record with grid list and added start time related user filter in the record and it works fine. But when i build the interface with the date filter - Anytime, Last 24 Hours, Last 7 days, Last 30 days, last 365 days, it gives me the below error for all values except for Any Time option.
Interface Definition: Expression evaluation error at function 'index' parameter 3 [line 55]: Invalid index: Cannot index property 'MilestoneSchedule' of type Text into type List of Variant.
Interface Code is below:
=============================================
load( local!daysFilterLabels: { "Any Time", "Last 24 Hours", "Last 7 Days", "Last 30 Days","Last 365 Days" }, local!daysFilterValues: {-1,0,1,2,3}, local!selectedDaysFilter: -1, local!showprocesstime: -1, local!pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 20, sort: a!sortInfo( field: "pp.startTime", descending: true ) ), with( local!datasubset: queryrecord( cons!MP_MY_ACTIVE_MILESTONE_SCHEDULES_RECORD, a!query( selection: a!querySelection(columns: { a!queryColumn(field: "MilestoneSchedule.ReqNumber"), a!queryColumn(field: "MilestoneSchedule.RFPNumber"), a!queryColumn(field: "MilestoneSchedule.AwardType"), a!queryColumn(field: "MilestoneSchedule.ProgramOffice"), a!queryColumn(field: "MilestoneSchedule.ContractingOfficer"), a!queryColumn(field: "MilestoneSchedule.ProjMSStartDate"), a!queryColumn(field: "MilestoneSchedule.ProjMSEndDate"), a!queryColumn(field: "MilestoneSchedule.ActMSStartDate"), a!queryColumn(field: "MilestoneSchedule.Title"), a!queryColumn(field: "pp.startTime"), }), filter: /*if(local!selectedDaysFilter=-1,null,null),*/ if(local!selectedDaysFilter=-1,null, if(local!selectedDaysFilter=0,a!queryFilter(field: "pp.startTime", operator: ">=", value: fn!todatetime(fn!today()-1)), if(local!selectedDaysFilter=1,a!queryFilter(field: "pp.startTime", operator: ">=", value: fn!todatetime(fn!today()-7)), if(local!selectedDaysFilter=2,a!queryFilter(field: "pp.startTime", operator: ">=", value: fn!todatetime(fn!today()-30)), if(local!selectedDaysFilter=3,a!queryFilter(field: "pp.startTime", operator: ">=", value: fn!todatetime(fn!today()-365)),null)))) ), pagingInfo: local!pagingInfo ) ), a!sectionLayout( contents:{ a!dropdownField( label:"Started", choiceLabels: local!daysFilterLabels, choiceValues: local!daysFilterValues, value: local!selectedDaysFilter, saveInto: local!selectedDaysFilter ), a!gridField( totalCount: local!datasubset.totalCount, columns: { a!gridTextColumn( label: "PR Number", field: "MilestoneSchedule.ReqNumber", data: index(local!datasubset.data.MilestoneSchedule, "ReqNumber", null), links: a!forEach( items: local!datasubset, expression: rule!MP_GenerateProcessDashboardLInk(fv!identifier) ) ), a!gridTextColumn( label: "Process Start Time", field: "pp.startTime", data: index(local!datasubset.data.pp, "startTime", null), showWhen: local!showprocesstime <> -1 ), a!gridTextColumn( label: "Solicitation/Other", field: "MilestoneSchedule.RFPNumber", data: index(local!datasubset.data.MilestoneSchedule, "RFPNumber", null) ), a!gridTextColumn( label: "Type", field: "MilestoneSchedule.AwardType", data: index(local!datasubset.data.MilestoneSchedule, "AwardType", null) ), a!gridTextColumn( label: "Division/Office", field: "MilestoneSchedule.ProgramOffice", data: index(local!datasubset.data.MilestoneSchedule, "ProgramOffice", null) ), a!gridTextColumn( label: "Contracting Officer", field: "MilestoneSchedule.ContractingOfficer", data: index(local!datasubset.data.MilestoneSchedule, "ContractingOfficer", null) ), a!gridTextColumn( label: "Projected Start Date", field: "MilestoneSchedule.ProjMSStartDate", data: index(local!datasubset.data.MilestoneSchedule, "ProjMSStartDate", null) ), a!gridTextColumn( label: "Projected End Date", field: "MilestoneSchedule.ProjMSEndDate", data: index(local!datasubset.data.MilestoneSchedule, "ProjMSEndDate", null) ), a!gridTextColumn( label: "Actual Start Date", field: "MilestoneSchedule.ActMSStartDate", data: index(local!datasubset.data.MilestoneSchedule, "ActMSStartDate", null) ), a!gridTextColumn( label: "Title", field: "MilestoneSchedule.Title", data: index(local!datasubset.data.MilestoneSchedule, "Title", null) ) }, value: local!pagingInfo, saveInto: local!pagingInfo ) } )))
========================================================
Any help is appreciated. Thanks!
Discussion posts and replies are publicly visible