web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Store attachments in S...
Power Apps
Answered

Store attachments in SharePoint List that Links to a SQL database

(1) ShareShare
ReportReport
Posted on by 19

I have a power app I have developed that connects to an Azure AI search service. There is a search page for users to search the title, category, and body of a KB article. We use a form to input, edit, and delete the entries in the KB. We decided that we were going to go with a SharePoint list for storing any attachments a user might have such as PDFs, CSVs and image files. The reason why we don't store everything in SharePoint is that the AI search service does not index it properly.

 

My question is when I store the entry in the database, it creates the Id number as the primary key and I want to tie that to the row in the SharePoint list to pull the attachments from. I will need to save the attachments and the database entry at the same time so that the indexer will retrieve them and display them for users. 

 

I've made the SharePoint list and I can add a small form with only one field, attachments, to show when I have a user fill out the rest of the information, but how do I immediately link them. Is there some sort of Power Automate flow I could use that once the entry is added in the database, pull it and attach the Id to the sharepoint list then when someone wants to view or edit, pull both the entry and the attachments.

 

rcoughanour_0-1720708472226.png

rcoughanour_1-1720709863184.png

As you can see from the form, attachments is a second list added which is linked to a SharePoint list and the rest of the fields are tied to the SQL database.

Categories:
I have the same question (0)
  • Verified answer
    rcoughanour Profile Picture
    19 on at

    Updating this to help someone else:

     

    So, I figured it out by creating a column called guid in my SQL database and then having the Title column in my SP list be the guid as well. I have a hidden field underneath the body section of my form that generates a guid and converts it to a text entry (SQL was giving me issues about saving the form using SubmitForm(). 

    Text(GUID())

    Then, I have the Title field hidden above the attachment control and have it linked to the Text Input for the GUID I just created.

    Text: TextInput1.Text

    When it saves, it stores that guid in the database and in SharePoint at the same time. When I go to retrieve the entry, I just have it return the GUID from the SQL database in a gallery view when browsing. I then have a button to View Attachments which takes me to another screen where it fetches the guid from sharepoint based on the 

    RecordsGallery1.Selected.guid

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 528

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard