Hi everyone!

I'm designing a web app with Reactive web app in OS11 and I'm having problem bootstraping images into my database

I already have a database created in SS, it has 3 entities: Sneaker, SneakerType and SneakerPicture

the Bootstrap data from excel file for the Sneaker entity works fine. 

Then I tried to bootstrap images for SneakerPicture entity, with a .zip file in the resources folder in the database tab. I created a server action for it in order to fetch the images in the .zip file into the entity. I also defined it in the Processes tab - Timers folder, set the "schedule" property to "When Published".

Then in the UI, i use the Table widget to show the data, but it doesn't work, the image column shows nothing. 

I dont know what is the problem here? can someone help me. i've also attached the OML file of my web app

google drive link for images: https://drive.google.com/open?id=1jidOy41dr8e2-XKNs9fFsf8IxoBrcVaP

thank you very much!


Hi Minh,

Bind your BootstrapSneakerpicture action with a button and try to debug .

I am not able to publish your module in my environment.


debugging will help you to identify the issue.

Regards

Seema

Hi Minh,

For others to be able to load and publish your module you have to upload it to your post directly as an .oml or .oap file. The IPP will be removed in the process. This enables others to publish it.

You on the other hand put the .oml in a zip file and uploaded the zip file, and because of that the IPP is not removed.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Minh,

For others to be able to load and publish your module you have to upload it to your post directly as an .oml or .oap file. The IPP will be removed in the process. This enables others to publish it.

You on the other hand put the .oml in a zip file and uploaded the zip file, and because of that the IPP is not removed.

Regards,

Daniel

ohh, i didn't know that. i have uploaded again my .oml file. thank you sir


Seema Pandey wrote:

Hi Minh,

Bind your BootstrapSneakerpicture action with a button and try to debug .

I am not able to publish your module in my environment.


debugging will help you to identify the issue.

Regards

Seema


I did try to put a button "Load" in the UI and use the Run Server Action with BootstrapSneakerPicture in its logic. It raised the error "Error executing query", and whenever i try to debug it, the dubugger screen shows nothing.

and btw, i uploaded again my .oml file. so sorry for this inconvenience

Hi Minh,

The upload of the OML can still not be published. Don't know why? The one you just uploaded comes straight from SS? 

But looking at your code I do not understand the filter condition in the GetSneakersByName 

Sneaker.Id = IntegerToIdentifier(TextToInteger(Substr(GetPhotos.FileList.Current.File.Name,0,Length(GetPhotos.FileList.Current.File.Name)-4)))

There is several things that can go wrong:

  1.  If you try out your code twice (after removing sneaker records), than the numbering of new records in sneaker does not start again at 1, instead it keeps numbering.
  2. You filter on removing the . extension from the file name asuming that the extension is always 3 characters,

It would be better to name the sneaker images with the name of the sneaker as defined in the excel file. Having the filter on the name is garantueed to work any time. You could consider to also create an index on the name in the Sneaker entity.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Minh,

The upload of the OML can still not be published. Don't know why? The one you just uploaded comes straight from SS? 

But looking at your code I do not understand the filter condition in the GetSneakersByName 

Sneaker.Id = IntegerToIdentifier(TextToInteger(Substr(GetPhotos.FileList.Current.File.Name,0,Length(GetPhotos.FileList.Current.File.Name)-4)))

There is several things that can go wrong:

  1.  If you try out your code twice (after removing sneaker records), than the numbering of new records in sneaker does not start again at 1, instead it keeps numbering.
  2. You filter on removing the . extension from the file name asuming that the extension is always 3 characters,

It would be better to name the sneaker images with the name of the sneaker as defined in the excel file. Having the filter on the name is garantueed to work any time. You could consider to also create an index on the name in the Sneaker entity.

Regards,

Daniel

Hi Daniel! 

I uploaded the .oml file from my computer. i think that's the reason why you can publish it, i have downloaded my project from ss and attached it again in the post. sorry for that, this is the first time i attached my project in a question. 

I will try to rename all of my pictures file name and do it all over again. thank you a lot for the tip.

here is my google drive link of all images, you can use this if you want: https://drive.google.com/open?id=1jidOy41dr8e2-XKNs9fFsf8IxoBrcVaP