How to Change a Picture within a Data Master

Joe shared this question 7 years ago
Answered

How do you programmatically change a picture in a data master without the user supplying the picture?

Comments (8)

photo
1

I'm afraid you can't. What you can do is to have a text field that has the information of what picture has to show the record and then add conditions in data grids and pages. So that when those data grids or pages load the place where the image of that record is displayed has a condition depending on the text value of the attribute of that data master.

photo
1

Victor, I have a text field in my data master with the URL of a photo that I would like to include in the data grid. I don't quite understand how to execute: "data grids or pages load the place where the image of that record is displayed has a condition depending on the text value of the attribute of that data master"


Could you explain in a little more detail.


Thanks, much

photo
1

I mean something like what is described in this tutorial http://www.justinmind.com/usernote/te... . I don't think there is any way to let the user include any file he wants. The only thing you can do is to have a pre defined set of images and choose one or another.

photo
1

That's not quite what I was hoping to do. I have a data master and one of the columns is called "photo". In that column I have a URL to a photo and each row in the data master has a different URL. Is there any way to use an interaction to load that URL into a photo in each row of a data grid?


I've created an interaction to set the value of an image widget during page load to select(data master, photo) but that doesn't produce the desired results.

photo
1

I'm afraid I don't know a way to do that.

photo
1

Can you think of any way to include a photo in every row of a data grid without manually uploading the photo for each record?

photo
1

By the way, I've talked to the development guys at Justinmind and it turns out there is a way to change an image using a URL. If you create an on page load event on the image in your data grid and then define a set value event on that image and, as the value, you insert a URL, then the prototype will show the image of that URL.