A problem with populating images on the portal widget.

User299200
Tera Contributor

I have a question about portal widgets. 

Please see attachments ... I have two widgets communicating with each other(widget 1 and 2).   

 

(1st widget)

(widget called  my pet)

find_real_file.png

 

(2nd widget)

(widget called pet selection)

find_real_file.png

find_real_file.pngfind_real_file.png

 

I have created a field variable for image which is a type image(Photo Image).

I'm just having a problem with understand why my images are not populating in the portal widget.

 

//Note this is extra info . 

I tested my  widget HTML  image code  image tag(<img src=>  by going to the db_image table  and pulling  <img src =  > find_real_file.png It populated an image, so I'm confused. Please help me to understand what's really going on. 

find_real_file.png

This was to test to see if an image would show or not  (note: this is ng-repeat, so the image will show up on all records first record to the End of list of records. 

 

Note:

 I have a table called pets with all the records, but I'm still having issues viewing images in the portal widget. 

find_real_file.png

 

 

 

1 ACCEPTED SOLUTION

Sebastian L
Mega Sage

In one of your widgets, you are writing: u_photo_image.toString(). Instead you need to write petsGr.getDisplayValue('u_photo_image'); 


Best regards,
Sebastian Laursen

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Hi,

Firstly, did you try using other browsers? did you try clearing cache ?

secondly, 

Navigate to the sys_attachment table and  navigate to Configure > Security Rules

find_real_file.png

In the next list you have all the access controls available to execute the CRUD for the table. Group by Operation and focus on the READ ones

find_real_file.png

Create a new Access Control on READ similar to the next image

find_real_file.png

 

This will allow people to see any image or attachment used by service portal instances in general

About access controls..

  1. First of all you can release/restrict content so be very careful or you can show something that user are not allowed OR hide something that they can see.
  2. In order to create Access Controls you need to elevate your role to security admin

find_real_file.png

 

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

I have tried but no luck. 

Thank you for the information. 

Sebastian L
Mega Sage

In one of your widgets, you are writing: u_photo_image.toString(). Instead you need to write petsGr.getDisplayValue('u_photo_image'); 


Best regards,
Sebastian Laursen

I see, thanks. I have to correct the code line  >>petsGr.getDisplayValue('u_photo_image'); ('Cape R")

to this

photo: petsGR.getDisplayValue('u_photo_image'),

 

I updated my two widgets with this information. 

 pet selection widget  changed code to ...

photo: petsGR.getDisplayValue('u_photo_image'),

 

my pet widget changed code to ...

photo: userPet.getDisplayValue('u_photo_image'),

 

The pictures displayed on both widgets. 

 

Thank you so much!!!!!