cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
luddiluddludde
Level: Powered On

Image in sharepointlist and displaying it...

So... I have created an app where  I log some data to a sharepoint list. I have added a camera control and I upload the image to the list just fine. In the list, the image is shown as base64 text (the column is multiline text, with rich text turned off).

 

My issue comes when I want to display the registered records. I cannot figure out how to add an image control that displays the image data for the current record... I reckon it should be something like ThisItem.<columnname> but I can't get that to work.

 

If I add a gallery control and configure that with the same list/data source, I can get the app to show images, but since it is a gallery it shows all the images in the list and not the one that is for the current record.

 

I can also display the image in an image control if I do this:

LookUp(testliste,Title ="01.05.2018",Bilde)

 

I reckon I want to add a new column for giving the records unique IDs so that I can do a lookup on the current ID. So, on to that, how can I make the lookup formula so that it looks up the value from the current record?

 

Am I making any sense?

 

4 REPLIES 4
Microsoft dinusc
Microsoft

Re: Image in sharepointlist and displaying it...

What type of "list" do you use to collect the image records? Is it a collection, listbox control?

You mentinoed that eventually all the images are stored in the SharePointlist. In this case, I would suggest to use a regular Gallery control to display just the image titles (you don't have to expose the actual images). Then, you can reference the image (Image of the Title in this case) selected form the gallery in another Image control as following:

Image1.Image = LookUp(Your_SP_List, Title=Gallery1.Selected.Title).Image_Column

The above formula will search the Image column (Image_Column) in your SharePoint list and will reference the image thast has the same title as the one selected in the gallery.

You may choose to use a better identifier (unique ID) instead of a Title column as it may not be unique.

luddiluddludde
Level: Powered On

Re: Image in sharepointlist and displaying it...

Thanks for the response. The list I use in sharepoint is one I created using a spreadsheet ;).

 

I have four columns that are as follows:

Date - Single line of text.

Location - Single line of text.

Status - Single line of text.

Picture - Multiple lines of text, with rich text turned off. (picture is stored here as base64).

 

Will look in to you response, however I am not just after the images. The app was built using the automatic build logic, so when I open the app, I see the records based on the first column, which is the date. When I select a record, I get the data for that date, and wanted to display the picture.

I guess I can change this screen to a gallery perhaps, and then add textboxes where I fetch the data from the other columns.

Microsoft dinusc
Microsoft

Re: Image in sharepointlist and displaying it...

If you build your app automatically that your data is already displayed in a Gallery control (in the first screen).You can edit that table so it shows only what you need. Also, since the suggested Lookup works on the underlying SharePoint list, you can query any data from that list, regardless of if it is displayed or not in any control in your app.

luddiluddludde
Level: Powered On

Re: Image in sharepointlist and displaying it...

Figured it out... There is a hidden ID-column, so I just used LookUp(datasource,ID=BrowseGallery1.Selected.ID,ImageColumn).

Works like a charm :D.

 

Now what I need to figure out is how to show the picture as an image in the sharepoint list :).

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,228)