Error during Query Test

Error during Query Test


When I'm trying to do a Test in a Advanced Query and I get this error message:

An Internal server error occurred. Please submit this infomration to OutSystems.

Cannot cast 'Integer' to OutSystems.HubEdition.Compiler.LanguageDataType

In the ServiceCenter, in the Error Log, I get this:


[1] Error in advanced query SearchEmployeesAdvQuery in Employee_SearchImportFormat (SELECT ENEMPLOYEE.[NUMBER_SEARCH] , ENEMPLOYEE.[FIRSTNAME] , ENEMPLOYEE.[SURNAME] , ENGROUP_2.[NAMESHORT], /* CompanyCode */ ( SELECT top 1 a.[externalid] /* AreaCode */ FROM {EMPLOYEE_AREA} ea inner join {AREA} a on (ea.areaid = WHERE ea.[employeeid] = ENEMPLOYEE.[usermasterid] order by asc), ENGROUP.[NAMESHORT] , /* DepartmentCode */ (select ENJOB.[EXTERNALID] from {JOB} as ENJOB /* JobCode */ WHERE ENJOB.[ID] = ENEMPLOYEE.[JOBID]) , ENEMPLOYEE.[RESPONSIBILITIES] , /* Responsabilities */ COMPANY_ORIGIN.[NAMESHORT], /* CompanyOriginCode */ ( SELECT ect.[Code] /* ContractTypeCode */ FROM {EMPLOYEE_CONTRACT_TYPE} ect WHERE ect.[id] = ENEMPLOYEE.[EMPLOYEE_CONTRACT_TYPEID]), ENEMPLOYEE.[PHONE], ENEMPLOYEE.[MOBILE], ENEMPLOYEE.[EXTENSION], ENEMPLOYEE.[FAX], ENUSER_MASTER.[EMAIL], ENE ...): Could not assign '' to 'Integer.Integer'... Input string was not in a correct format.

at ssDirectory.Flows.FlowUserFlow.ScrnEmployee_AdvancedSearch.CommandExport_Codes(HeContext heContext)
at ssDirectory.Flows.FlowUserFlow.ScrnEmployee_AdvancedSearch.wtLNK_ExportCodes_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain()

Best Regards

Hi Telmo,

Thank you for your email.

About the internal error, that should be submitted to the folks at Engineering so they can replicate and fix it.

About your query test, maybe we can find a workaround:
  • Have you found which parameter is responsible for that error? Try to determine it by changing values in the parameters and testing the query again.
  • Is the value you're inserting a valid one (example: inserting a text value when it expects an integer)?

Hope that helps.
Don't forget to submit the error to OutSystems. Make a screen snapshot and email it to if you're not able to submit it.

Pedro Gonçalves
Hello Telmo

I suggest you try to change the output structure of that query to one that contains all the fields with type TEXT, and see if you still get the same error.

Also, as Pedro Gonçalves suggested, if you haven't done so yet, make sure to submit that error to OutSystems by using the Submit Feedback option or simply sending an email.

With best regards,
This problem ocurred to me and i just replace the names "ENEMPLOYEE" with the name of the entity in your case...{EMPLOYEE}.

Best Regards,