cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gigaenvy
Helper II
Helper II

Best advice for PDF Viewer and SP List with SP Document Library?

Hi,

 

I need some advice on how to relate a SP List A record item with a SP Document Library upload.

 

My Powerapp has Screen 1 with Gallery A. When you select the item in Gallery A it navigates to Screen 2 which displays the record items. A PDF View media control appears based on the Visible property if an attachment exists in SP List A record. But for the life of me I cannot display the attachment. All my flows and variations fail or never display (with error).

 

I think my answer is that I need to use a Flow to take those attachments uploaded via Form in Screen 1 and get them into a Document Library.

 

Question: How can you upload files for a SP List A item and then make the Document Library items relate back to that SP List A record item? This is my missing link.

 

Can someone help me relate SP List A record item to the Document Library files that were uploaded?

 

Here is how the app should work:

  • In Powerapp we create a new record in SP List A inside a form and attach a file and submit.
  • SP List A creates a new item record (ID) with the title or name such as Joe Smith. Joe Smith then has a record in SP List A with an attachment such as PDF.
  • Flow takes the file attachment(s) and sends to a Document Library and converts to base64().
  • User goes into the Powerapp and selects the item Joe Smith from Screen 1 Gallery A.
  • The item button navigates to Screen 2 Gallery B and display the record fields from SP List A and also pops up a PDF Viewer only if there is a file attached to the SP List A record.

How can I link or relate the SP List A record to the document library upload(s) for that SP List A ID?

 

Thanks,

 

Tom

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Gigaenvy 

Consider adding a column to your document library called ListAId (or whatever you want) as a number column.

 

Then in your Flow that puts the document in the library, change it to also set the metadata on the file and put the ID column value from List A into the ListAId column.

 

Then you can Filter or Lookup the document in the library based on the List A ID value.

ex. Lookup(docLibrary, ListAId = ThisItem.ID)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

1 REPLY 1
RandyHayes
Super User III
Super User III

@Gigaenvy 

Consider adding a column to your document library called ListAId (or whatever you want) as a number column.

 

Then in your Flow that puts the document in the library, change it to also set the metadata on the file and put the ID column value from List A into the ListAId column.

 

Then you can Filter or Lookup the document in the library based on the List A ID value.

ex. Lookup(docLibrary, ListAId = ThisItem.ID)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (77,451)