cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
olsen9
Resolver III
Resolver III

Patch is deleting datepicker value when saving

Date is already in DatePicker10 but clears it out on Save

 

Patch(
SPList,
LookUp(
SPList,
ID = SharePointIntegration.Selected.'ID'
),

 

{
Date10: DatePicker10.SelectedDate

}

)

);

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@olsen9 

Okay...let's see if you run into it again!

_____________________________________________________________________________________
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

RandyHayes
Super User
Super User

@olsen9 

Is DateofConcurrence10 the column??  You indicated it was Date10 in your original posted formula!

 

Also, the thing here is your history shows that NO date was submitted.  Which is why it would then show empty in your datepicker.

 

But, I believe your problem stems from the Gallery!  You are referencing DatePicker10 out of context.  DatePicker10 is in your gallery.  If your button to submit is outside of the gallery, then you will only be referencing the DatePicker10 of the row that is currently selected.

 

You indicated that your Gallery has 10 items/records.  But your Items formula will only ever produce one record!

 

So, there is some confusion as to what you are doing with the gallery still.

_____________________________________________________________________________________
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

11 REPLIES 11
RandyHayes
Super User
Super User

@olsen9 

What is the DefaultDate property of the datepicker?

_____________________________________________________________________________________
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!

ThisItem.Date10

RandyHayes
Super User
Super User

@olsen9 

Okay...working backward - What is ThisItem?  Is your datepicker in a form or a gallery?

 

_____________________________________________________________________________________
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!
olsen9
Resolver III
Resolver III

gallery

RandyHayes
Super User
Super User

@olsen9 

Okay...next, what is the Items property of your Gallery?

_____________________________________________________________________________________
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!

Filter(SPList, ID=SharePointIntegration.Selected.'ID')

RandyHayes
Super User
Super User

@olsen9 

So you have a gallery table that will only have ONE record?  What does purpose does a gallery serve in this case?

 

Back to your original statement though - "Date is already in DatePicker10 but clears it out on Save"

When you refer to Save - are you referring to the Save button in the SharePoint interface?

When you say it clears, are you stating that all the rest of the information is there but the DatePicker date disappears? 

_____________________________________________________________________________________
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!

my gallery is for 10 items.  But the Save Icon (not interface save) I am using to patch updated records would clear out the date already in place.  I just republished the form and did a test on date10.  It did not clear out the date this time.  Strange.  I will monitor this and reach out if it happens again.

RandyHayes
Super User
Super User

@olsen9 

Okay...let's see if you run into it again!

_____________________________________________________________________________________
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!

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 (3,836)