Error in Evaluating Numeric Expression
int Display_Views.buy_sell_count_custom_filter(string bu_csu, string buy_sell, string Month_field, string Year_field, date Start_Date, date End_Date)
{
bs_rec = Investor_Meeting_Log [ID == ID];
month_item = thisapp.Display_Views.get_month(input.Month_field);
year_item = input.Year_field.toLong();
start_month = input.Start_Date.getMonth();
end_month = input.End_Date.getMonth();
start_year = input.Start_Date.getYear();
end_year = input.End_Date.getYear();
ctr = 0;
for each history_record in Investor_Meeting_Log
{
if ((((((history_record.Company == input.bu_csu) && (history_record.Buy_Sell_Side == input.buy_sell)) && (month_item >= start_month)) && (month_item <= end_month)) && (year_item >= start_year)) && (year_item <= end_year))
{
ctr = history_record.count();
}
}
// history_record = Investor_Meeting_Log [(((Company == input.bu_csu && Buy_Sell_Side == input.buy_sell) && month_item > input.Start_Date) && Date1 < input.End_Date)];
// ctr = history_record.count();
return ctr;
When I run the program it says it has an error in the variable year_item. I have tried writing the toLong the other way but it still gives an error regarding the evaluation of the NUMERIC Expression.