cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KamilHCP
Helper I
Helper I

Picture to and from Sharepoint

Hi!

 

I'm developing (that's a big word) an app for me to us in my company. It will be used to help me to communicate with technical department whenever there is a quality problem with parts after production process. I used Help Desk template and changed couple things for my needs. I also want to add picture to each individual ticket and see that picture in view tickets screen and that's tricky for me. 

So far I've managed to add picture to my Sharepoint (that's my database) using PowerAutomate and json binarydata, but only to my "Share document" in Sharepoint. How I can add it to other sites? Is there a special column I need to create? 

 

The solution I want to achieve:

When I hit "Create ticket" button new ticket must be created with all given information like "Title", "Priority", etc. and also with photo in the same Sharepoint site 

 

That's the formula right now to "Create ticket" button :

 

Patch(ListaZgloszen,Defaults(ListaZgloszen),{
Title:CreateTicketScreenCategoryDropDown.SelectedText.Value,
Priority: CreateTicketScreenPriorityDropDown.SelectedText.Value,
TaskStatus:"NIE ROZPOCZĘTY",
PercentComplete: 0,
AssignedTO:"",
Description:CreateTicketScreenTaskDescription.Text,
Category:CreateTicketScreenCategoryDropDown.SelectedText.Value,
Numercz_x0119__x015b_ci:CreateTicketScreenTaskNumerCzesci.Text });
Reset(CreateTicketScreenTaskDescription);
Reset(CreateTicketScreenCategoryDropDown);
Reset(CreateTicketScreenPriorityDropDown);
Navigate(ConfirmSubmitScreen,None)

 

And that's formula to send picture to Sharepoint :

 

UploadafiletoSharePointfromPowerApps.Run(UploadButton.FileName,Mid(JSON(UploadImage.Image,JSONFormat.IncludeBinaryData), Find(",", JSON(UploadImage.Image, JSONFormat.IncludeBinaryData))+1, Len(JSON(UploadImage.Image,JSONFormat.IncludeBinaryData)) - Find(",", JSON(UploadImage.Image, JSONFormat.IncludeBinaryData)) -1))

 

How to combine it? And how to upload picture to the same record as other information? 

11 REPLIES 11
yashag2255
Dual Super User II
Dual Super User II

Hi @KamilHCP 

 

You can add the power automate to App via button and then update the expression as below:

Patch(ListaZgloszen,Defaults(ListaZgloszen),{
Title:CreateTicketScreenCategoryDropDown.SelectedText.Value,
Priority: CreateTicketScreenPriorityDropDown.SelectedText.Value,
TaskStatus:"NIE ROZPOCZĘTY",
PercentComplete: 0,
AssignedTO:"",
Description:CreateTicketScreenTaskDescription.Text,
Category:CreateTicketScreenCategoryDropDown.SelectedText.Value,
Numercz_x0119__x015b_ci:CreateTicketScreenTaskNumerCzesci.Text });
Reset(CreateTicketScreenTaskDescription);
Reset(CreateTicketScreenCategoryDropDown);
Reset(CreateTicketScreenPriorityDropDown);

UploadafiletoSharePointfromPowerApps.Run(UploadButton.FileName,Mid(JSON(UploadImage.Image,JSONFormat.IncludeBinaryData), Find(",", JSON(UploadImage.Image, JSONFormat.IncludeBinaryData))+1, Len(JSON(UploadImage.Image,JSONFormat.IncludeBinaryData)) - Find(",", JSON(UploadImage.Image, JSONFormat.IncludeBinaryData)) -1));

Navigate(ConfirmSubmitScreen,None)

 

Note: If you want to pass the reference of the sharepoint item, then you can add a new paramater and pass it from there.

 


Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi!

 

Thank you for answering! Yes, I can do that as you wrote, but how to upload this photo to the last row in SharePoint? I'm able to add attachment with Power Automate using Flow only to Ticket's ID 25. What expression I should put in Flow to get attachment into last row? 

 

KamilHCP_1-1611053094168.png

 

KamilHCP_0-1611052980138.png

 

 

yashag2255
Dual Super User II
Dual Super User II

Hi @KamilHCP 

 

You can send the id of the item created from the app as a parameter and then concatenate it in the URL, this way it will only update the item for the user and will work best if multiple people are using the app at same time. Tp pass parameters from app to flow, you can refer: https://www.youtube.com/watch?v=1MC7hAJTPdU

Note: Pass a parameter of type string instead of number.

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi,

 

Thank you for your replay - I think I'm missing a lot of basic knowledge regarding PowerApps, Flow and so on. Because right now it looks like rocket science for me 🙂 I will try to overcome this issue using your solution 

yashag2255
Dual Super User II
Dual Super User II

@KamilHCP 

 

Please take your time and reply on the same thread if you are stuck at any point, we are here to help 🙂 Take baby steps as per the video I shared, and you will be able to build the required functionality.

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thank you 🙂 

 

My goal is to update the last row in column "attachments" in SharePoint (List "ListaZloszen") using this flow. I've tried to use "Last" formula in expression bar, but without success 

 

KamilHCP_0-1611061517145.png

 

yashag2255
Dual Super User II
Dual Super User II

Hi @KamilHCP 

 

You can add an "Get Items" action before create file and set the sort on Created On field. Set Top Count to 1. Now, instead of 25 you can use the ID from dynamic content in the flow.

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Like this?

 

KamilHCP_0-1611063852825.png

 

KamilHCP
Helper I
Helper I

With this set up I'm able to add attachment to first row (ID 25), but idea is to add to the last:

 

KamilHCP_0-1611065961070.png

 

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (58,432)