cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Two separate 'Date & Time" columns in sharepoint list

Hi,

I've started testing my app and came up with a question. There are two screens in my app, both of them contain separate 'Date and Time' columns, with default value 'Today's Date'. Problem is when I enter data on screen1 and today's date is recorded, the same date is recorded in column that is on screen2. My idea is to enter data on screen1 and get today's date recorded automatically and then after few weeks to populate the entry in screen2 and get the date of that day recorded automatically. Any ideas how to accomplish this?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Two separate 'Date & Time" columns in sharepoint list

Hi @Concrete ,

Based on the needs that you mentioned, I think the second solution could achieve your needs. Please make sure the form mode of your EditForm2 has been in Edit Mode already when you edit previous submitted data in your Editform1.

 

When you want to edit previous submitted record in Edit form2, you need to use EditForm(EditForm2) function to convert the Editform2 into Edit mode. Then bind the Item property of the EditForm2 to previous submitted record.

 

If you still have some issues with this scenario, I think a quick call in Teams would be better in your scenario.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Two separate 'Date & Time" columns in sharepoint list

HI @Concrete ,

Could you please share a bit more about your scenario?

Do you want the "Date and Time" field in screen2 to be populated when you enter a entry in Screen2, rather than be populated along with the submitted data in Screen1?

 

Based on the needs that you mentioned, I think a variable could achieve your needs in Screen2. Please set the OnVisible property of Screen2 to following:

UpdateContext({IsSet: true})

Set the DefaultDate property of the "Date and Timer" DatePicker field in Screen2 to following:

If(
   IsSet,
   Today()
)

Only when you navigate to Screen2 to enter a entry, the "Date and Timer" field would be populated with date of that day automatically.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Two separate 'Date & Time" columns in sharepoint list

Hi,

 

Long story short.  I have a sharepoint list with these columns ID, Color, Time&Date1 (default value - today's date), Time&Date2 (default value - today's date), Mass.

 

I've created an app with two screens. Screen1 contains: ID, Color, Time&Date1. Screen2 contains: Time&Date2, Mass.

 

The problem is that when I enter data in Screen1, Time&Date2 gets automatically filed and I don't want that. Bear in mind that on Screen2 I'm populating the same entry with additional data.

 

@v-xida-msft I've tried what you just suggested, but it doesn't work.

Highlighted
Community Support
Community Support

Re: Two separate 'Date & Time" columns in sharepoint list

Hi @Concrete ,

Do you add individual Edit form within your two screens?

Do these two Edit forms connect to your same SP List? Do you want to use second Edit form to edit previous submitted data within the first Edit form (edit same record in your SP List)?

 

Based on the needs that you mentioned, I think this issue is related to the formula you typed within the DefaultDate property of the Time&Date2 field DatePicker.

 

As an fixed solution, please take a try with the following workaround:

Set the DefaultDate property of the Time&Date2 field DatePicker in your Edit form 2 to following:

If(
   EditForm2.Mode = FormMode.Edit,   // EditForm2 represents your second Edit form
   Today(),
   Blank()
)

Note: The Time&Date2 field would be populated only when your second Edit form is in Edit form (edit previous submitted data in first Edit form).

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Two separate 'Date & Time" columns in sharepoint list

Hi @v-xida-msft ,

 

Do you add individual Edit form within your two screens? Yes, Screen1 - editform1 and Screen2 - editform2.

Do these two Edit forms connect to your same SP List? Yes

Do you want to use second Edit form to edit previous submitted data within the first Edit form (edit same record in your SP List)? Basically yes, I just want to add additional data to the same record.

 

I've tried your second solution as well but it doesn't seem to work.

Highlighted
Community Support
Community Support

Re: Two separate 'Date & Time" columns in sharepoint list

Hi @Concrete ,

Based on the needs that you mentioned, I think the second solution could achieve your needs. Please make sure the form mode of your EditForm2 has been in Edit Mode already when you edit previous submitted data in your Editform1.

 

When you want to edit previous submitted record in Edit form2, you need to use EditForm(EditForm2) function to convert the Editform2 into Edit mode. Then bind the Item property of the EditForm2 to previous submitted record.

 

If you still have some issues with this scenario, I think a quick call in Teams would be better in your scenario.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,751)