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

@KamilHCP 

 

You have to add Created to the order By field. This will sort the records in descending order and fetch only 1 record.

Order By: 

Created asc

 

Hope that 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,

 

Should I use "Created desc" in order to get the last ID? When I do "Created asc" SharePoint list updates the first row, but with "Created desc" is trying to update the last one. 

 

Hmm, it looks like the folder for attachment is created using this Flow because there is no error and also there is this hint using "Folder Path" bar. At the beginning there was only "Attachments25"

 

KamilHCP_0-1611069723130.png

KamilHCP_1-1611069735366.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

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (68,561)