Compilation Error, error CS0103 when using local variable in an aggregate filter

I've added a filter in an aggregate filter, then publish got following error:

Internal Error
Compilation Error.
Global.asax.cs(88,13): warning CS0612: 'OutSystems.HubEdition.RuntimePlatform.SessionDefaults' is obsolete
ScreenServices.XXXX_MainFlow_ReportList_Controller.cs(338,226): error CS0103: The name 'varLcYearIdentifier' does not exist in the current context
ds_output.List = XXXX_MainFlow_ReportList_ScreenModel.datasetGetReportsByApplyDate(heContext, datasetGetReportsByApplyDate_maxRecords, IterationMultiplicity.Multiple, out count, Functions.ssGetYear(heContext, varLcYearIdentifier).ssENYear.ssLabel, model.varLcTableSort);


Hi Cindy,

What kind of application are you creating? Web, Mobile or Reactive?

Kilian Hekhuis wrote:

Hi Cindy,

What kind of application are you creating? Web, Mobile or Reactive?

Hi Kilian,

I am creating a Reactive Web App.


Hi Cindy,

Am I correct in assuming you're working on a reactive web app?

If I'm reading the error correctly it doesn't find the YearIdentifier when you're calling the GetYear function.

Could you provide us with some more details about what it is you're trying to do?

Kind regards,
Glenn




Hi glenn,

YearIdentifier is a local variable.

I've designed to update the value of YearIdentifier when a dropdown on change. Then update the list by aggregate filter with YearIdentifier.




Cindy Ho wrote:

Hi glenn,

YearIdentifier is a local variable.

I've designed to update the value of YearIdentifier when a dropdown on change. Then update the list by aggregate filter with YearIdentifier.




Cindy Ho,


For what I understand you are comparing an integer with a label? Is the label a text? 

Thanks.


Cindy Ho wrote:

Hi glenn,

YearIdentifier is a local variable.

I've designed to update the value of YearIdentifier when a dropdown on change. Then update the list by aggregate filter with YearIdentifier.




Hi Cindy,

After replacing the local variable with a site property it published without issue so the problem is definitely the local variable within your filter. My best guess is that he's trying to fetch the data before the local variable has been initiated.


@Glenn: That can't be the problem: this isn't a runtime error, it's a compilation error.

Kilian Hekhuis wrote:

@Glenn: That can't be the problem: this isn't a runtime error, it's a compilation error.

You're right, I forgot about that part of the error.
Do you have any idea what might be causing this issue Kilian? 


My best guess is a bug in the Platform :). Reactive Web Apps are very recently introduced, so the compiler might contain a bug or two.

Kilian Hekhuis wrote:

My best guess is a bug in the Platform :). Reactive Web Apps are very recently introduced, so the compiler might contain a bug or two.

Agreed, that might indeed be the cause, guess there's no real solution then. 


Update: It's on OutSystems' radar, once I know more I'll post it here.

I had a similar error and was able to work around it for now by using a Get Data From Other Sources Action. Try it.