Jump to content
  • 0
MyMelody

Display Image in Calculated field

Question

Hi ,

 

I have a calculated field on my Reports DataPage. If the age of the user is greater than or equal 18, then it will display the details of the contact person assigned. It is working properly. However, I would also like a picture to appear. How do I add a picture to the formula in the calculated field?

 

Thanks.

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @MyMelody,

 

This can't be done using a calculated field alone. You will also be needing HTML Blocks.

First, the photo must be saved inside your Caspo Bridge under All Assets > File. http://prntscr.com/mizlbp

You need to create an app parameter to be called on your calculated field.
http://prntscr.com/mizlzi
https://howto.caspio.com/apps/app-parameters/

Then on your DataPage, insert two calculated fields. One is for the image (http://prntscr.com/mktprf) and the other one is for the text (http://prntscr.com/mktpfj).

Insert an HTML Block to display the result of the calculated field as an image. 
http://prntscr.com/mizoyq
Click the source button and insert this code: 
<img src="[@calcfield:1/]" >

Lastly, you need to hide this calculated field using two HTML Blocks. You can use this link for reference:
https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-hide-fields-in-datapages/

Hope this helps.

 

- kristina

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...