cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Place the datepicker adjacent to each other, added through SharePoint

I had a field in SharePoint list called "Registration Date". I designed a powerapps form and was able to submit successfully.

 

However, we had a change in design and the "Registration Date" field to be split into 1. Registration Date (From) , 2. Registration Date(To).

 

To implement this, I renamed the existing Registration Date to Registration Date (From) and created an extra field in SharePoint for Registration Date(To)

 

However, I needed FromDate and ToDate field inline, rather than on separate datacard. Since its 2 different datacards, am unable to club it together in a single field adjacent to each other.

 

Date.PNG

 

I added a datepicker inside one of the datacard and the datepicker now appear adjacent to each other. However, the 2nd datefield added through powerapps, should get saved into the SharePoint field.

 

Anyidea on how to save the date value from the datepicker added through powerapps to Sharepoint.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Place the datepicker adjacent to each other, added through SharePoint

Hi @Kumar9024021 ,

Do you want to put the two date fields data card into single one data card rather than separated data fields?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs. As an alternative solution, I think the custom data cards could achieve your needs.

 

On your side, you could consider disable the "Registration Date (From)" field and "Registration Date (To)" field within your Edit form, instead, add a custom data card in your Edit form, then within the custom data card, add two DatePicker controls:

2.JPG

 

3.JPG

 

4.JPG

Please configure your Edit form as above, then set the OnSelect property of the "Submit" button to following:

Set(FromDate, RegistrationDateFromPicker.SelectedDate);
Set(ToDate, RegistrationDateToPicker.SelectedDate);
SubmitForm(EditForm1)

set the OnSuccess property of the Edit form to following:

Patch(
      'Your SP List',
      EditForm1.LastSubmit,
      {
       'Registration Date (From)': FromDate,
       'Registration Date (To)': ToDate
      }
);
Set(FromDate, Blank());
Set(ToDate, Blank());
Back()

 

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.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User III
Dual Super User III

Re: Place the datepicker adjacent to each other, added through SharePoint

Since the Datacard itself is bound to a specific field there is no way to have two datepickers bound to different fields inside a single datacard.  But here's a workaround

 

1) Set Visible property of the two regular start and end date datacards to false

2) Add two datepickers to the form and set their default to Today() for a new form and the date in the field for an edit form

3) Set the default property of the two hidden datacard fields to the appropriate datepicker's selected date property.

 

Now when you edit the visible start and end datepickers on the form it will set the two hidden datacards.  When you submit the form those values will be saved.



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

Re: Place the datepicker adjacent to each other, added through SharePoint

Hi @Kumar9024021 ,

Do you want to put the two date fields data card into single one data card rather than separated data fields?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs. As an alternative solution, I think the custom data cards could achieve your needs.

 

On your side, you could consider disable the "Registration Date (From)" field and "Registration Date (To)" field within your Edit form, instead, add a custom data card in your Edit form, then within the custom data card, add two DatePicker controls:

2.JPG

 

3.JPG

 

4.JPG

Please configure your Edit form as above, then set the OnSelect property of the "Submit" button to following:

Set(FromDate, RegistrationDateFromPicker.SelectedDate);
Set(ToDate, RegistrationDateToPicker.SelectedDate);
SubmitForm(EditForm1)

set the OnSuccess property of the Edit form to following:

Patch(
      'Your SP List',
      EditForm1.LastSubmit,
      {
       'Registration Date (From)': FromDate,
       'Registration Date (To)': ToDate
      }
);
Set(FromDate, Blank());
Set(ToDate, Blank());
Back()

 

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,798)