I have a model Artist, which has a field “mainImageUrl”. It is the principal image of the artist.
The image urls can be obtained by a call to the server, because they are from different sources and not all are stored in the database.
I want to create a smart action to choose the image. I want to call my server, get the images urls, display the images and their urls to the user, so he could choose which url is the main.
Can I do that with a smart action? Or something else if you have an idea 
Thank you very much!
2 Likes
Hi @Cyrielle_Willerval,
I am not sure you can do something friendly with a simple Smart Action.
Unfortunately, we do not provide multi step Smart Actions yet.
A general idea could be to:
- Create a Smart Relationship
Artist hasMany Images
.
- Access this relationship from an
Artist
detail page.
- Make all the pictures displayed (in the related data list), configuring the image url field with the file viewer widget.
- Create a Smart Action “Set user main image” to set the “mainImageUrl” of a user (on the “image” collection).
- Select the picture you want in the related data and trigger the “Set user main image”
Does it make sense?
1 Like
The images are not the database, because they are updated very often from another application. So I don’t think I can display it with the related data
But thank you for your answer!
Smart Relationships can be implemented with any type of sources:
- database for native collections
- but also APIs for integration with 3rd party services (Stripe, Intercom, Mixpanel…)
I see no limitation in the fact that those images are not in your main database.
2 Likes
Ahh I did not know that, it seems great!
2 Likes