cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lsmael
Regular Visitor

Patch blank / empty value from combobox people picker to a Sharepoint List

So I have a Patch button that will patch several fields to a Sharepoint list. In the sharepoint list the person column is not required but the patch function won't work at all if the combobox people picker is left empty. The formula to patch this column is the one bellow (which works fine providing someone was selected):

 

;

Agente:{ //name of the column in sharepoint list
Claims: Concatenate(
"i:0#.f|membership|";
Agente.Selected.Mail // Person email
);
Department: "";
DisplayName: Agente.Selected.DisplayName; // Agente here is the combobox name
Email: Agente.Selected.Mail; // Person email
JobTitle: "";
Picture: ""
};

 

PS: don't mind the semicolons, for some reason it's the way to work in brazilian portuguese Powerapps.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@lsmael 
Well, you're going to have to submit a blank.  The formula you provided will not.

Your formula should be:

...
Agente:
  If(IsBlank(Agente.Selected.Mail); Blank();
   { 
     Claims: "i:0#.f|membership|" & Lower(Agente.Selected.Mail);
     Department: "";
     DisplayName: Agente.Selected.DisplayName; 
     Email: Agente.Selected.Mail; 
     JobTitle: "";
     Picture: ""
    }
  );


...
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
RandyHayes
Super User
Super User

@lsmael 

Turn on the Formula Level Error management feature in your app.  Otherwise, you will not be able to write a blank back to the satasource.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I have tried this and so far no good.

RandyHayes
Super User
Super User

@lsmael 
Well, you're going to have to submit a blank.  The formula you provided will not.

Your formula should be:

...
Agente:
  If(IsBlank(Agente.Selected.Mail); Blank();
   { 
     Claims: "i:0#.f|membership|" & Lower(Agente.Selected.Mail);
     Department: "";
     DisplayName: Agente.Selected.DisplayName; 
     Email: Agente.Selected.Mail; 
     JobTitle: "";
     Picture: ""
    }
  );


...
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

It worked like a charm. Thank you very much!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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