Initialize variable with asset


I have uploaded some images in my assets and I would like to set up images dynamically with the assets.
In theory I would like to create an object with properties, and each property will be an asset.
then in my algorythm I will set the image with the asset dynamically.

Do you have any tips for me ?


1 Like

One way to do this is to manually enter all of your image filenames into a local DB (database) and then loop through the rows and assign the cell value to a different image component. You’ll want to familiarize yourself with the Any Component blocks.

But the absolute easiest way to do this is to use a Data Viewer List or Data Viewer Grid with images bound to a local DB.


Another way is to create a list with all the names of your assets and then use the list # to assign images to your components dynamically and whenever needed in your code.

just to be sure I can simply call the asset by the name of the file ?

1 Like

Yes you can. If your asset name in the project is “myphoto.jpg” then you just use this name to change the picture or background image of the component or any where in your code that makes use of the image.

1 Like