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 / Upload picture in a fo...
Power Apps
Unanswered

Upload picture in a form only if new one is captures

(0) ShareShare
ReportReport
Posted on by 101

Hey there. 

I got a edit form where I can delete the existing picture and can capture a new one. Now when I only want to save the form without a new picture, I got error messages. On a save button I got this following formula: 


UploadaphototoSharePointfromPowerApps.Run(DataCardValue4_1.Text & ".jpg", takenpic2, DataCardValue4_1.Text, DataCardValue4_1.Text);
SubmitForm(PersönlicheAngaben_1);
FormMode.View;
Navigate(Personalübersicht, Fade)

 

I think I have to write by the first formula an if(...) but I can not figure out on what it should reference to. 

 

Marc_Gutzwiller_1-1611349390630.png

 

Furthermore the FormMode.View does somehow not work... 

 

Thank you very much for you help! 

Categories:
  • Marc_Gutzwiller Profile Picture
    101 on at

    Update:
    I decided to solve my problem with a different approach. I build a custom field in the form and took an icon for taking pictures if needed (new screen). The required information (personal nr, name) I wanted to save in picture gallery I took with the ClearCollect to the new screen.

    Marc_Gutzwiller_0-1612801399017.png

    OnSelect: 

    ClearCollect(PersNr, {PERSONALNUMMER: Personalnummer.Text, NAME: Name.Text}); Navigate(TakePicture, Fade)

    On the new screen I built a gallery and loaded the collection.

     

     

    Now when you already have a picture of this person (with the same personal ID) and want to update it, I worked with the RemoveIf. So the existing pictures will be deleted first and then the new one will be uploaded.

    RemoveIf(MABilderApp, IDMitarbeiter = Value(PersnrGallery.Text));
    UploadPictrueToSharepointV2.Run(PersnrGallery.Text & ".jpg", takenpic, PersnrGallery.Text, NameGallery.Text);
    Clear(PersNr); 
    Back();

    Marc_Gutzwiller_1-1612802096954.png

     

    I hope this will help someone. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard