cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ArnieJ
Frequent Visitor

Adding multiple images to multiple columns (Power Apps / SharePoint)

Hi all,

 

Question: How do I create a Power App that adds a new row to a SharePoint list, where each column contains multiple images?

 

Context: I need a sort of inspection app, with ~50 questions. For each question, there needs to be a multiple choice question, a text box and the possibility to add either zero, one or multiple photo's. The multiple choice questions lead to a final score per inspection. The final deliverable is an overview of all inspections, and reports per inspection (e.g., in PDF).

 

Where I am now: I have played a bit in Power Apps, but until now I have nothing. My idea was roughly to build a Power App, connected to a SharePoint list (or multiple and combine them via lookup) and then automate the process of making a report in Power Automate. As I could have known from the Dunning-Kruger effect, I underestimated it. In particular for the part of how to be able to connect multiple images to multiple questions is hard, making 50 one-to-many lookups doesn't seem the best solution to me. Forum posts I found about the topic are quite old, or only handle the combinations of either multiple questions with one image or multiple images for one question (e.g., the template inspection app). So I'm already stuck at the beginning.

 

Help on how to connect multiple images to multiple questions is highly appreciated! (No code/low code answers are preferred). Other solutions meeting the deliverables are also welcome. Thank you for your help and for reading this far!

13 REPLIES 13
cha_cha
Resident Rockstar
Resident Rockstar

Hello @ArnieJ 

 

Since you are working with N:N relationship here, it might be confusing if you continue with SharePoint as it does not support natively N:N relationships. You can do it manually but it will take a lot of time. Dataverse or the use of SQL database would be your best route.

 

Just in case you are curious how to do it on SharePoint if that is only your option:

(1) list for images

(2) list for questions

(3) list for relationship 

cha_cha_0-1669124440323.png

 

 

If you can adjust a bit of your requirement, you can use SharePoint wherein you can link the image to the question as an attachment. But this will be a 1:N relationship. 1 question to multiple images. If you want it to be used to another question, you will have to reupload the image and attach to another question.

 

If ever you want to see how Dataverse does it, watch this video, start at 25:00 for the N:N relationship demo. The limitation of Dataverse is that it has limited space so if you have thousands of images, you will need to pay more.

There is a way to use a mix of Dataverse and SharePoint but that would still mean you will have to pay for PowerApps license.

 

https://www.youtube.com/watch?v=byUuEoDQjiU&ab_channel=RezaDorrani

 

 


 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

Thanks for your response @cha_cha!

 

Apparently, I wasn't clear enough. I don't have a N:N (luckily)  but fifty 1:N relationships: each picture belongs to a single question. 

 

So I think the second part of your answer applies, about the lists. Do I understand it correctly if I say that only one list for images is needed? I thought I would need to have fifty of them. Could you elaborate on that option for me or do you know where to find the answer?

 

Thanks in advance!

 

ArnieJ
Frequent Visitor

@IzzyWizz, could you perhaps help me on this question? 

 

In a reply on this post on uploading images, you seem to have done something similar for an audit app.

cha_cha
Resident Rockstar
Resident Rockstar

Hello @ArnieJ 

 

I just recorded a demo on how to do it. Sorry, completely miss your last response about it.

https://youtu.be/kdLezC1FM68

 

Please bear with the video as I did not prepare and did it on the go.


 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

I really appreciate you taking the time to even record a video, @cha_cha !

 

However, I'm unfortunately afraid that I wasn't able to get my question across in the right way..

 

Maybe I should restate it:

- I have 50 questions (e.g., "Is it safe?", "Is it clean?")

- For each question, the inspector has to do three things

  1. Choose "Yes", "No", or "Not applicable" (mandatory)
  2. Add images as proof (not mandatory)
  3. Add any additional remarks (not mandatory)

Later, when I make a report from the inspection, I want to show each photo to each corresponding question. Every picture is a unique photo, so there is no M:M.

 

This shows how it could look like (took it from another forum post)

ArnieJ_0-1670258043240.png

 

cha_cha
Resident Rockstar
Resident Rockstar

Hello @ArnieJ 

 

I understand. would probably stop here.

 

Here are my last thoughts:

If each question's answer needs to be analyzed, use SQL cause it will be far more efficient than a database.

If only the inspector result matters, store the answer via multi-text in JSON format and you easily retrieve it one by one for later. This will result in 1 SP record per entry.

{
  "qno" : 1
  "answer" : "Yes"
  "image" : "a long URL to Document Library"
  "remarks" : "a remark about the question"
}

OR

{
  "qno" : 1
  "answer" : "Yes"
  "imageid" :  5 // Id to the document library upload
  "remarks" : "a remark about the question"
}

 

You can use automate to store images on one document library and pull them out via their URL or ID.

 

Lastly, please consider creating a new post about this so it goes to the new list of topics, someone might give you a more applicable idea..


 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

I understand that you're stopping here. Thank you for your time.

 

Unfortunately, I don't understand enough of Power Apps (yet) to use the JSON suggestion and I don't know how to use SQL. I'll therefore just follow your suggestion of creating a new post..

Hi @ArnieJ ,

I do have an audit app that is up and running but I limit the images as much as possible and never use more than one image per task. The image is saved in a single column in a Sharepoint row, one row representing one task. 

The reason I limit images is that they slow down the app so much that (on our connection, anyway) they make it unuseable. Even with one image per task, I have PowerAutomate move completed tasks onto a different Sharepoint list so that the active tasks list doesn't get too long.

I save the images using the method you will have seen in my old posts, I don't add them as attachments in a SP column as I found that makes it much easier to view them in the app in galleries etc. 

I never make reports outside the app that include the images themselves, I just report on things like number of outstanding tasks, number of completed tasks.

Regards,

Izzy.

 

@IzzyWizz, thank you for your clarifications!

Using three columns per question (yes/no, remarks, and image), I assume you will have a lot of columns in your list as well. What number of total questions/columns do you have, then I can get an idea of the performance of my app.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,950)