cancel
Showing results for 
Search instead for 
Did you mean: 

Display image from the attachment folder

Former Member
0 Kudos
1,025

Hello,

At the moment I am working on an embedded component for the marketing lead TI.

The purpose of the component is to show a image stored in the attachment folder.

In order to realize my plan I used a image control in the UI designer and bound it to the BinaryObject of the document from the attachment folder.

However, the stored image won't be shown in the image control.

Do you have any suggestions to solve my problem?

Thank you in advance

Best regards

Sebastian

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey,

I am still working on the same issue. But it´s not working, the image won´t be shown in the image control.

Do you have any other ideas?

I very much appreciate your help and suggestions.

Here are my screenshots:

Best regards

Sebastian

Former Member
0 Kudos

Why the image control property "source" is binded with an element called ImageBinary? It should be binded with the L2S_BusinessCard

Former Member
0 Kudos

I also tried to bind the image control property "source" with the attribute L2S_BusinessCard....

Former Member
0 Kudos

Try to bind the L2S_BusinessCard to the content of the L2SLead->L2SBusinessCard.

Where di you put the absl code? Is the code working? Did you try in debug mode?

Former Member
0 Kudos

My absl code will be executed when the embedded component is loading:

My Absl code is working. I checked the code in the debug mode:

And I bound the image control with content of the L2SLead L2S Business Card attribute:

Is the ImageControl working on your solution?

Best regards

Sebastian

Former Member
0 Kudos

I  tried and finally I understood:

the imagecontrol wants the image path, not the binary

Former Member
0 Kudos

Do you know how  i can generate a image path of an image in the AttachmentFolder?

I also tried with the attribute PathName and FileContentURI of the Document.

Former Member
0 Kudos

No sorry on this I can't help

Let's wait for some official reply from SAP

FabianEgner
Explorer
0 Kudos

Hi Sebastian,

how did you solve the problem with the URL of an Attachment?

thanks & regards,

Fabian

Former Member
0 Kudos

Hi Fabian,

We could only use a web address image in Cloud Studio for displaying image.

Best Regards,

Frankie

Former Member
0 Kudos

Can you share some screenshots?

Former Member
0 Kudos

Hallo,

here are the screenshots:

and the sreenshot from the data model:

I also tried to bound the image control to the pathname, but the image won´t be shown.

When I use a static image-URL from the web, the image will be displayed. Maybe I should use

a URI from the Attachment Content, but I dont know how to create a URI from the file content.

(The field FileContentURI is empty)

Do you have any suggestions?

Thank you for help.

Best regards

Sebastian

Former Member
0 Kudos

Hi,

the AttachmentNode is a collection. You need to select the correct instance of the collection using ruby or absl, and fill a single structured field binded with the image.

Former Member
0 Kudos

Hi Alessandro,

Thank you for your response and advice.

Can you provide more details or share some example code?

Do I need to bind the image control with the BinaryObject? Or with the Pathname?

Thanks

Former Member
0 Kudos

For your last question I think BinaryObject.

You need to perform a code like this on the collection:

var selected = this.collection.where(n => n.<property> = <selection value>);

and put the selected var in an attribute of your BO.

Then bind the attribute in the data model and finally with the image control