cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

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
Super User III
Super User III

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

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

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,463)