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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Attachment option in H...
Power Apps
Unanswered

Attachment option in Help Desk power app?

(0) ShareShare
ReportReport
Posted on by 65

Hi all,

 

We are trying to make an Help Desk app where users will be able to create ticket with an attached image. After attachment is uploaded to Help Desk application, and submitting a ticket, that image should be stored on a OneDrive or SharePoint list for example? I want to add an attachment option/button just below "Description" section.

Does anybody have experience with this?

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @Rados :

    Do you want to add "add attachment" feature to the app.

    Do you want to use SharePoint as your data source instead of Office365Users?

    Could you tell me whether these fields you mentioned have any special requirements for the data type, or only need the program to run correctly?

    This is not difficult to achieve, but to achieve it requires complex operations.

    I suggest you read the link at the bottom of my post, this will help you understand my solution.

    Here is my solution:

    1\Add a list('SP TicketList')

    I assume that the data type is configured in the following way.

    Column (click to edit)

    Type

    Title

    Single line of text

    Description

    Single line of text

    Category

    Single line of text

    PercentComplete

    Single line of text

    Priority

    Single line of text

    AssignedTO

    Single line of text

    TaskStatus

    Single line of text

    In addition,ID, Author, Editor, Modified, Created, Created By, Modified By are the default fields of SharePoint list, do not need us to customize

    2\Modify the code

    I have listed as many detailed steps as possible, but the actual operation is only to replace the data source and adjust some value reference. For specific operations, you can follow the guidance of APP Checker.

    MyTicketsScreen(Screen):

    MyTicketsScreenGallery-Items: 

     

    If(isAdmin,Sort('SP TicketList',ID,Descending),Sort(Filter('SP TicketList',Author.Email = MyProfile.Mail ),ID,Descending))

     

    MyTicketsScreenGalleryId-Text: 

     

    ThisItem.ID

     

    ViewTicketScreen(Screen):

    1\modify the code

    ViewTicketScreenCanvas

     ViewTicketScreenDataCard

       ViewTicketScreenId-Text: 

     

    SelectedTicket.ID

     

       ViewTicketScreenModifiedBy-Text: 

     

    Coalesce(First(Office365Users.SearchUser({searchTerm:Text(SelectedTicket.Editor.Email)})).DisplayName, SelectedTicket.Editor.Email)

     

       ViewTicketScreenCreatedBy-Text: 

     

    Coalesce(First(Office365Users.SearchUser({searchTerm:Text(SelectedTicket.Author.Email)})).DisplayName, SelectedTicket.Author.Email)

     

    2\Add a Display form(Form1)- Used to display attachments

    DataSource: 

     

    'SP TicketList'

     

    Item: 

     

    SelectedTicket

     

     

    CreateTicketScreen(Screen):

    1\modify the code

     CreateTicketScreenCreateButton-Items:

     

    Patch('SP TicketList',Defaults('SP TicketList'),{
     Title:CreateTicketScreenTitleText.Text,
     Priority: CreateTicketScreenPriorityDropDown.SelectedText.Value,
     TaskStatus:"NOT STARTED",
     PercentComplete: "0",
     AssignedTO:"",
     Description:CreateTicketScreenTaskDescription.Text,
     Category:CreateTicketScreenCategoryDropDown.SelectedText.Value},Form1_1.Updates);
     Reset(CreateTicketScreenTitleText);
     Reset(CreateTicketScreenTaskDescription);
     Reset(CreateTicketScreenCategoryDropDown);
     Reset(CreateTicketScreenPriorityDropDown);ResetForm(Form1_1);
    Navigate(ConfirmSubmitScreen,None)

     

    2\Add a New form(Form1_1)- Used to display attachments

    DefaultMode:

     

    New

     

    DataSource: 

     

    'SP TicketList'

     

     

    ConfirmationDeleteScreen(Screen):

     ConfirmationDeleteScreenDeleteButton-OnSelect:

     

    Remove('SP TicketList',LookUp('SP TicketList',ID =TicketToDelete.ID));
    Navigate(MyTicketsScreen,ScreenTransition.None)

     

    EditTicketScreen(Screen):

    EditTicketScreenCanvas

     EditTicketScreenDataCard

       EditTicketScreenHeaderTickerNumber-Text: 

     

    SelectedTicket.ID

     

       EditTicketScreenHeaderTickerCreatedBy- Text : 

     

    Coalesce(First(Office365Users.SearchUser({searchTerm:Text(SelectedTicket.Author.Email)})).DisplayName, SelectedTicket.Author.Email)

     

       EditTicketScreenHeaderTickerModifiedBy- Text : 

     

    Coalesce(First(Office365Users.SearchUser({searchTerm:Text(SelectedTicket.Editor.Email)})).DisplayName, SelectedTicket.Editor.Email)

     

       EditTicketScreenUpdateButton-OnSelect:

     

    If(isAdmin,
     Patch(TicketList,LookUp(TicketList,Id=SelectedTicket.ID),{
     
     Priority:EditTicketScreenPriorityDropDown.SelectedText.Value,
     Category:EditTicketScreenCategoryDropDown.SelectedText.Value,
     TaskStatus:EditTicketScreenStatusDropdown.SelectedText.Value, 
     PercentComplete:EditTicketScreenCompletedSlider.Value/100,
     AssignedTO:AssignedToUserDisplayName,
     Editor:MyProfile.Mail,
     Modified:Now(),
     Description:EditTicketScreenDescriptionInput.Text
     }),
     
     Patch(TicketList,LookUp(TicketList,Id = SelectedTicket.ID),{
     Priority:EditTicketScreenPriorityDropDown.SelectedText.Value,
     Category:EditTicketScreenCategoryDropDown.SelectedText.Value,
     Editor:MyProfile.Mail,
     Modified:Now(),
     Description:EditTicketScreenDescriptionInput.Text
     }
    )); 
    Reset(EditTicketScreenCompletedSlider);
    Reset(EditTicketScreenStatusDropdown);
    Navigate(MyTicketsScreen,None)

     

     
     

    In addition, I think these links will help you a lot:

    HelpDesk App tasklist

    Need to add Attachment to a PATCH to a SharePoint List

    Best Regards,

    Bof

  • Rados Profile Picture
    65 on at

    @v-bofeng-msft ,

    Yes, I want to add multiple attachments feature to the app (if possible). A SharePoint list is set as data source file. I've used this link as a reference: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/help-desk-install

    This solution works just fine, but we need to make some changes. Is it possible to make a column "photo" in SharePoint data source file, which will collect attached photos in Help Desk app? Eventualy, we wanto to be able to put other files also (word, excel, pdf..).

  • v-bofeng-msft Profile Picture
    on at

    Hi @Rados :

    Do you want to patch the SharePoint list with the images?

    Firstly ,I want to explain why you can not patch the image to the SharePoint list.

    Since the data source is SharePoint, It is not feasible to update the Picture field with an image file in canvas app.

    In addition, you can update Hyperlink field with URI.

    Column type

    Support

    Default cards

    Hyperlink

    Yes

    View URL
    View text

    Picture

    Yes (read-only)

    View image
    View text

    I think this link will help you a lot :

    SharePoint/Known issues

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-sharepoint-online#lists

    Secondly,If you insist on doing this, there are ways. But this solution requires flow, which will make your development work more difficult.

    I think this link will help you a lot:

    PowerApps: Upload Images to SharePoint

    https://piyushksingh.com/2019/09/25/powerapps-upload-images-to-sharepoint/

    How to Upload Camera Pictures directly to Microsoft SharePoint with PowerApps and Microsoft Flow:

    https://explore.emtecinc.com/blog/how-to-upload-camera-pictures-directly-to-microsoft-sharepoint-with-powerapps-and-microsoft-flow

    Best Regards,

    Bof

     

  • Rados Profile Picture
    65 on at

    Hi @v-bofeng-msft,

    Just to notice you that I didn't find solution for our Help Desk App. I've been busy these days, because I'm finishing another Power App, so sorry for my late answer. I found potential solution, for Help Desk App, on this link: https://repointtechnologies.com/saving-images-from-powerapps-to-sharepoint/, but I didn't read it yet. Soon as I finish app I'm currently working on, I will send a post.

    Thanks for your feedback!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard