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

connecting app so it inputs the data into sharepoint list

Hi All, 

 

So I am creating an appointment app which allows you to put your name/date/time of when you want to book an appointment. 

 

Screenshot 2020-07-27 at 11.16.35 AM.png

 

What I want is the user filling this out on power apps not to be able to double book a slot that is already taken. 

 

here is the formula im using for the onselect of the button

 

If(
IsBlank(LookUp('Parent Booking', 'Time slot'=Dropdown1.Selected.Value && Date=DateValue(Text(Calendar_1.StartDate))).ID),
Patch('Parent Booking', Defaults('Parent Booking'), {'Full Name':TextInput1.Text, Date: DateValue(Text(Calendar_1.StartDate)), 'Time slot':Dropdown1.Selected.Value}),
Notify('The date and time have been selected. Please select another time')
)

 

here is the layout of the list:

 

Screenshot 2020-07-27 at 11.23.39 AM.png

 

But the errors I'm getting is the following

 

Screenshot 2020-07-27 at 11.24.55 AM.pngScreenshot 2020-07-27 at 11.25.03 AM.pngScreenshot 2020-07-27 at 11.25.10 AM.pngScreenshot 2020-07-27 at 11.25.17 AM.png

 

 

 

Can anyone help! Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: connecting app so it inputs the data into sharepoint list

Hi @AB1 ,

I cannot see your data, but the error is indicating that the field 'Full Name' does not exist in your list 'Parent Booking'.

Have you renamed this field from something else - possible Title?

If(
   IsBlank(
      LookUp(
         'Parent Booking',
         'Time slot'=Dropdown1.Selected.Value && 
         Date=DateValue(Text(Calendar_1.StartDate))
      ).ID
   ),
   Patch(
      'Parent Booking', 
      Defaults('Parent Booking'), 
      {
         'Full Name':TextInput1.Text, 
         Date: DateValue(Text(Calendar_1.StartDate)), 
         'Time slot':Dropdown1.Selected.Value
      }
   ),
   Notify('The date and time have been selected. Please select another time')
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: connecting app so it inputs the data into sharepoint list

Hi @AB1 ,

I cannot see your data, but the error is indicating that the field 'Full Name' does not exist in your list 'Parent Booking'.

Have you renamed this field from something else - possible Title?

If(
   IsBlank(
      LookUp(
         'Parent Booking',
         'Time slot'=Dropdown1.Selected.Value && 
         Date=DateValue(Text(Calendar_1.StartDate))
      ).ID
   ),
   Patch(
      'Parent Booking', 
      Defaults('Parent Booking'), 
      {
         'Full Name':TextInput1.Text, 
         Date: DateValue(Text(Calendar_1.StartDate)), 
         'Time slot':Dropdown1.Selected.Value
      }
   ),
   Notify('The date and time have been selected. Please select another time')
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Helper III
Helper III

Re: connecting app so it inputs the data into sharepoint list

Thanks @WarrenBelz 

 

So after changing it back to title this have now fixed it! but im still getting two errors

 

Screenshot 2020-07-27 at 12.05.08 PM.pngScreenshot 2020-07-27 at 12.05.18 PM.png

 

Thanks in advance

Highlighted
Super User
Super User

Re: connecting app so it inputs the data into sharepoint list

Hi @AB1 ,

Same issue it seems - it is telling you that a field does not exist in the data source.

Also, you did not need to rename the field back, just refer to it as Title in Power Apps as SharePoint retains the original name given.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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
Top Kudoed Authors
Users online (3,636)