No Record show when view data from entity

No Record show when view data from entity

  

Hi, realised that i am put it in the wrong forum so here i am here to post the question.

I am new to outsystem and have gone through the learning material. Really need help on this please.

I am working to import excel sheet data to outsystem. When i successfully import the excel sheet and it create the entity, i want to view the data from the entity but it indicate that there is no record to show.

May i know what is the possible error that it cannot preview the data?

Thanks

Hi

Are you sure you are importing the excel without errors? Maybe share your code and excel that way will be easier to help you.

Best Regards,

Marcelo Ferreira

Hi XL,

Are you doing the Bootstrap to load data ?



Regards

-PJ-

Hi,

If you want to import the data into an entity, you need to use the Bootstrap. Right click on the Entity and choose Advance and use "Update Action to Bootstrap....", it will ask you to choose the Excel and will show you the column mapping.

Let me know if you face any issues.

Shashank

Hi all,

Appreciated for the help. 

Yes i am using the bootstrap to load the data. I have tried to import entities using excel a few times with no error. But this time round when i import it again, it doesn't show any records when i view the entities data.

Hi,

When i import entities from excel, i did see that it show the data model of your module is inconsistent with the database. 

manage to see the error log.

i am seeing this error value too large for column (actual: 2004, maximum: 2000)

I got a large data for this column and how can i fix this issue?

Check the column data type and change it accordingly. i.e. if it is Text you can manually increase the Length. Let me know if you need further help.

Shashank

Hi XL,

See this link also Database Data Types , it will give you an idea how Outsystems creates data types in background based on the length of the text column. It also gives you understanding of OS data types mapping with all three supported data types.



Regards

-PJ-


Hi,

I did try to change the length according to the need for the column, but it still show the same error. It will rollback to 2000 chars.

Hi,

Can you tell us what data type that column is having. You mean even if you change the length it is rollback to 2000 chars?

Shashank...

Hi,

When you create entities from an excel, the system does the following:

1. Import the excel as resource

2. Create the entity

3. Create the structure that will be used in bootstrap

4. Create the bootstrap action in logic (this is the routine will import the data into database)

5. Create the timer to execute the action on publish

Only after you publish the data will be imported.

Cheers,

Eduardo Jauch

To solve the problem of the 2000 characters, go to your entity (the one created when importing the Excel), and change the size of the field giving you trouble to something "bigger". It is probably set to 2000 characters.

Than you can publish and the bootstrap should run without problems.

Cheers,
Eduardo Jauch 

Hi,

i am using text for the data type of the column with length 5000. 

But i still got this error:

value too large for column "DESCRIPTION" (actual: 2004, maximum: 2000) 

Hello XL, 

Did you changed the length also in the STRUCTURE that is created to hold the excel data used in the bootstrap?
Booth the structure and the entity must have the text fields with the same size.

Cheers,
Eduardo Jauch

Hi Eduardo,

Yes, i have made changes for the length in the entity and structure. Thatwise i find it weird how come the error log still show this "value too large for column "DESCRIPTION" (actual: 2004, maximum: 2000) "

I don't think that outsystem restrict the maximum length for text will be 2000 right?

Hi XL,

The limit for Text data is 2000, refer to the link for Data Type for more details. Thats why i think you are getting the error.

https://www.outsystems.com/help/servicestudio/9.0/Using_Data/Database_Data_Types.htm

Shashank..

Hi Shashank,

The limit is not 2000. If your Text attribute in the entity has LESS than 2000 characters, the system will create the table in the database with certain data type, otherwise it will use another, to be able to hold this information.

In any case, there is no such "limitation" as 2000 characters.

XL,

Can you do a small test? Copy the entity, delete the original, and rename the new one to have the same name as before. Than, try it again.

In any case, could you provide your OML or the excel to me to take a look and test?
You can send it in PM if you prefer.

Cheers,
Eduardo Jauch

Hi Eduardo,

Yes, you are right that limit is more towards core database to identify which type of datatype has to be used.


Hi XL,

I am trying to replicate your scenario at my end, to see what i get. Meanwhile if you want you can share the OML or Excel as Eduardo mentioned.


Shashank...

Hi XL,

I have just tried it and it worked for me.

Step 1 - Created the entity from the Excel.

Step 2 - Updated the column length to 2500 in both entity and the structure.

Step 3 - Created the Bootstrap and ran the timer.

Step 4 - Saw the table have the record now, checked the length of data as well, it is 2041 chars.


May be you try again from scratch.


Shashank..

The problem here seems that the table in the database was created with the wrong type, because it was published with 2000 length, and changing the length after is not changing the type (it seems)

This is why I'm suggesting XL to copy the entity (with correct length) and delete the original, because this will create a new table in the DB, now with the correct type.

You can also just erase the attribute and create a new one (but than I think it will require a new name).

Cheers,
Eduardo Jauch

Shashank Diwan wrote:

Hi XL,

I have just tried it and it worked for me.

Step 1 - Created the entity from the Excel.

Step 2 - Updated the column length to 2500 in both entity and the structure.

Step 3 - Created the Bootstrap and ran the timer.

Step 4 - Saw the table have the record now, checked the length of data as well, it is 2041 chars.


May be you try again from scratch.


Shashank..

May i know how to ran the timer??


Hi XL Toh,

Go to Service Center >> Monitoring >> Timers

You will see all timers here, you can find your specific one, click on the Timer name and it will show you all details. Here you have option to see if your Timer is active or not.You have another option "Run Now" to kick start it.

Please let me know if this works.

Shashank...

Hi Shashank, Eduardo Jauch

Thank you very much for the help. 

I manage to see the data record with all the recommendation you guys give. :)

Awesome....:)

Thanks for the feedback.

Cheers

Shashank...