394
Views
12
Comments
Unable to bootstrap excel
Application Type
Mobile

When trying to import data from an excel sheet (which previously worked perfectly) I am now getting an inexplicable error: "Excel read error in row 2: Column 'Task' has an invalid type. Expected a 'Int32' but received a 'String'"

Both the entity and the Excel structure have the column set to Text. WHY is it asking for an integer? This column has never at any point been set to integer.

VetSupport1.oml
2019-07-01 07-16-04
Vinod Patidar

Hi Ken,

I have published given OML in my personal environment and It is successfully Bootstrap the Tasks.xlsx.


Thanks

Vinod

UserImage.jpg
Ken Wallace

Thanks Vinod

Note however that the foreign keys were not assigned by the Bootstrap method, even though the identical procedure worked before.

I played around randomly with deleting the resources and re-importing them etc. Finally got it to work without being at all clear what fixed it.

This is a problem because I need to re-import this configuration data often as my client updates it. My guess is that the excel tables on OutSystems server are not always replaced properly. Not having direct access to them or the database is a major problem for me - I'm used to developing on a lower level. Not enjoying OutSystems much and will recommend to my client not to use it.

But here is another OML that will (hopefully) work if you want to take another look.

VetSupport.oml
2019-07-01 07-16-04
Vinod Patidar

Hi Ken,

We can modify BootstrapTasks server action as per our requirements. 

If Task is already exist in entity then we can update it by using UpdateTask. If not exist then we can create new task.

The default implementation does not import the data in entity if records are already exist. We can change default implementation as per our needs.

Thanks

Vinod

2021-01-19 14-07-32
Tom Zhao

Hi Ken

>Not having direct access to them or the database is a major problem for me - I'm used to >developing on a lower level. Not enjoying OutSystems much and will recommend to my >client not to use it. 

To be clear, you can access to the database directlly in none-personal enviroment.

Regards,

UserImage.jpg
Pranav Shingane

Hi @Ken Wallace ,

1) If this i happen then please check variable holding or assigning variable type. Or you have used stricture and 2nd columns is having int. 

2) Check excel sheet column type and entity column type

UserImage.jpg
Mark Collins

Having the same issue. We recently had the platform upgraded.  This data load has always worked before, but now getting this for a field that is defined by the import spec and the data base table as being a text field, but getting the error saying it is expecting an int.  Can't find any reason this would be the case.

2022-08-03 04-32-50
Ravi Punjwani

Hi Mark,

Can you share an OML file, some screenshot or SQL query about how are you inserting the data?

I suspect you might be using SQL which may have fields in different order, or have not specified the fields in insert query explicitly.

UserImage.jpg
Mark Collins

Unable to share the OML and not using SQL.


It is the ConvertFromExcel Outsystems action that is failing when it reads the file, so can't even get to the insert.  This is Outsystems code that I can't modify.

This is the specification, it declares TeamName to be a text field.


This is the error from the error log that says for some reason, the Outsystems code is taking the Text data type and reporting that it is expecting an Int32 from the column.  Nothing I can do to fix this, this is an Outsystems error.  This code has worked several times previous to the upgrade of the platform on our server environments.  We have previously reported other issues, that Outsystems did come back and report that they had broken some functionality around SSO based on the upgrade (removed an option that I was supposed to check based on Outsystems documenation)




2021-01-19 14-07-32
Tom Zhao

Hi Mark

I understand you can't share your OML file. But can you share the excel file with sample data?

Regrads,

UserImage.jpg
Mark Collins

Added sample file.  The error is occurs on the TeamName.  The spec calls for a string in the field, the data is a string but OS is trying to load an Int32 (indicates that is what it is expecting from the specification), so not sure why this is happening, the only change since we have loaded this file previously with this exact specification, is that the platform has been upgraded.

SampleLoad.xlsx
2021-01-19 14-07-32
Tom Zhao

Hi Mark

The excel seems no problem. Maybe you should raise a support case to Outsystems.

Regards,

UserImage.jpg
Mark Collins

Will do.  Thanks for taking the time to look at it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.