Get single Image Attachment from Data Provider (Budibase Internal Database) without using a Repeater #12036
iraklishubitidze
started this conversation in
Show and tell
Replies: 1 comment
-
Thanks for sharing @iraklishubitidze ! Incidentally there is also an open issue around making this a little more easy / obvious to do: #8807 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey Peeps,
I was trying to get a single image attachment from the database without using a repeater and wanted to share the handlebars syntax for anyone interested. I have several "custom" images and wanted to save these in the database and not save them all elsewhere and get the link for every image.
In the docs I found the way, where you can use a Repeater to display the images from the database, but I wanted to avoid the repeater.
My example data:
If you want the the white globe in row 5, you can use the following structure:
Connect the data provider to the correct database and give the data provider a name (in my case Image Data Provider).
Next you can use the following syntax in the URL of the image component, to get the image attachment from the fifth row:
{{ Image Data Provider.Rows.[5].ImageBlob.[0].url }}
Hope that helps some of you!
Beta Was this translation helpful? Give feedback.
All reactions