Replace static image by formula

Hi,
I want to implement following use case:
whenever someone taps on the static image and selects an image from the phone gallery, I want that the static image gets replaced.

I’m not able to include a static image when I bind a formula to the image…
If I use the formula directly in the image component, then no preview image is shown.

Any idea how I can solve this?

Well, it depends. In order to show the image if the user will go to the other page and back (or close the app and then reopen it), you will have to store the image somewhere. In our solution, we are storing the profile images in Firebase Storage. Then you have to load it from that storage with the formula as you have mentioned.

Your solution would change the image, however, if you reopen the app, it will be gone. The formula for your use case would be IF(AppVars.profileImage == “”, , AppVars.profileImage). :slight_smile:

1 Like

There’s also a formula called DEFAULT() for these situations: DEFAULT - AppGyver

1 Like