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

Submit to Textbox inputs and image to sharepoint list

Hi all

 

I currently have the following patch formula which successfully submits textbox entries to my sharepoint list.

 

lascough20_0-1661170468947.png

However, I can't get this to work with a couple of image uploads. Any ideas?

My two images are called 'addmediaTestrig' and 'addmediaGauge', the sharepoint columns are TestRig and Gauge.

Many thanks in advance.

Lee

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @lascough20,

Glad that everything looks as expected.

Could you please mark my solution as an answer if it solves your problem?

Thanks for your cooperation.

Best Regards,
Qi

View solution in original post

12 REPLIES 12
Gochix
Solution Sage
Solution Sage

Hi @lascough20 ,

 

There is many tutorials how to do this. Please use search.

See @WarrenBelz's excellent blog about this.

https://www.practicalpowerapps.com/images/powerapps-sharepoint-images-storing-and-viewing/ 


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

lascough20
Helper I
Helper I

Hi @Gochix ,

Thanks, I'll take a look. I do use search before posting questions but being new to all this don't always find what I need. 

Thanks again for your reply.

v-qiaqi-msft
Community Support
Community Support

Hi @lascough20,

Actually, this is an old topic in Power Apps.😂

There are different ways to achieve this, however it depends on what is you want.

 

There are several column types supporting saving images, multi-line-of-text type saves image like binary format, Attachment type save image like an attachment using the Attachment control within a form.

Note that both of them could not display the image itself in your SharePoint list, that's the limit.

 

1). To save the image within multi-line-of-text type column, you just need to add an add picture control(AddMediaWithImage1), once you click the AddMediaWithImage1 and upload an image, you could write your Patch function as below:

Patch(TTSiteInfo,Defaults(TTSiteInfo),{<Your_Original_Fields>,MultiLineOfTextColumn: Substitute(JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData),"""","")})

You just need to add the MultiLineOfTextColumn part behind the Pass field.

 

2). To save the image within Attachment type column, you just need to add an edit form and edit fileds(Leave only the attachments field), then write your Patch() function as below:

Patch(TTSiteInfo,Defaults(TTSiteInfo),{<Your_Original_Fields>,Form1.Updates)

More details, you could check the this thread.

 

Best Regards,
Qi

Hi

It seems so close but so far....

I have used the option 1 which when previewing the app looks to be uploading. However, nothing shows in the MultiLineOfTextColumn. The function is highlighted below:

 

lascough20_0-1661430652608.png

Am I missing something? Is there something I should be changing in the Sharepoint list?

So grateful for your help up to now.

Thanks

Lee

Hi @lascough20,

Could you please tell me what is the imgTestrig and imgTestgauge, are they both  add picture control?

The solution I provided could only work for the AddPicture control, it makes no sense if you use the Image control.

vqiaqimsft_2-1661481109936.png

You should reference to the UploadedImage1 control within.

Best Regards,
Qi

Hi

I've renamed the UploadImages1 and 2 so I can identify them easier on the form. Everything looks as you have shown.

lascough20_0-1661506721056.png

I'll keep trying so thanks for you help so far.

Regards

Lee

Hi @lascough20,

Glad that everything looks as expected.

Could you please mark my solution as an answer if it solves your problem?

Thanks for your cooperation.

Best Regards,
Qi
lascough20
Helper I
Helper I

Hi @v-qiaqi-msft 

Everything looks to be working, I'm not getting any error messages but I can't get the binary code (if that's the correct terminology) to show in the Sharepoint column. Am I missing something from the Sharepoint column settings?

lascough20_0-1661872344507.png

It's frustrating because it's so close to working. Thanks for your help so far.

Lee

Hi @lascough20,

Could you please make sure that both of the TestRig and TestGauge are Multi-line-of-text column type?

If it is convenient, please make a gif to describe the column settings and what you have done in Power Apps.

 

Take it easy, we could figure it out.😃

Best Regards,
Qi

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,784)