cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
twister
Post Patron
Post Patron

date save into collection

Hi, how do I cater for my below case?

 

I have input date to patch into collection. The DefaultDate property I have set to Now() to get current date. The issue if after I Patch to collection, the invoice date will display to default current date.. How do I to display the date that I have selected before save to collection?

 

For below case, I have already select 1/3/2021 for my invoice date..

 

In Collection:

twister_1-1617023634077.png

But still display current date after patch..

 

twister_0-1617023559776.png

Thanks

17 REPLIES 17
twister
Post Patron
Post Patron

yes..should be same...

twister_0-1617073693867.pngtwister_1-1617073730981.pngtwister_2-1617073762032.png

 

Bilakanti
Responsive Resident
Responsive Resident

@twister ,
In the last screenshot, you are using a different collection schema, I mean presales and amountsales columns are missing, And I am sure the issue is not with date column.

twister
Post Patron
Post Patron

my bad to not include that 2 column.. but i have tried..its same..

 

twister_1-1617075780628.png

 

Bilakanti
Responsive Resident
Responsive Resident

@twister ,
1.Can you change the collection name from colApp1 and check once, the reason behind that is once collection is created, it stores it's schema metadata for that particular instance of the app, which sometimes will not update, so we can save and close the app once and then open or we can change the collection name to see if that works.
2. In the screenshot which you have sent, try to change the invoicedate column value to string(Any value for test) and see if there are no errors, If yes, then it's clear that, somewhere invoicedate column is assigned with string value, and hence it's expecting the same string rather than datetime value.

twister
Post Patron
Post Patron

i just try rename the invoicedate and the error is gone.. what is actuallt this happen? quite times this issue happen to me.. before this my variable error like this..after rename its it working..

twister_0-1617084798966.png

 

Boynog
Helper II
Helper II

Hi @twister ,

 

Use UpdateContext({beforeDate}); put the selected date before you trigger the patch and after the patch you should reset the calendar.

 

Put this query in Default Calendar

If(IsBlank(beforeDate), Now(),beforDate)

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

twister
Post Patron
Post Patron

like this? but got error..

twister_0-1617092773202.png

 

Hi @twister ,

 

Follow this step.

Boynog_0-1617094052016.png

 

Then put the value of Set to the DatePicker1.

Boynog_1-1617094161588.png

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,790)