Hi everyone! 🙂
I'm building a form with Sharepoint Integration. This form is used to register for courses.
I don't understand why when I submit the form the data is not saved in the database
These are some formulas for better comprehension:
First of all I calculated how many places of the course have already been booked:
DataCardValue_Booked - Defaults:
Count(Filter('Electives Reservations'; ComboBox_Courses.Selected.Value = Elective.Value).ID)
Elective Reservation = list name
ComboBox_Courses = combobox in the form where I chose the course I want
then I calculate how many places are left compared to the maximum number of registrations
Label - Text
If(IsBlank(DataCardValue_PlacesAvailable);10;DataCardValue_PlacesAvailable-DataCardValue_Booked)
through the email and the ID of the course I verify that I have not previously registered for the course. If the number of my enrollments in the course is less than 1, I set the "places" variable which contains the number of places still available, and also submit the form. Otherwise, I reset it
SharePointIntegration - OnSave
If(Count(Filter('Electives Reservations'; email = DataCardValue_Email.Text; Elective.Value = ComboBox_Corsi.Selected.Value).ID) < 1;
Set(postili;(Posti.Text));;SubmitForm(SharePointForm1);;ResetForm(SharePointForm1))
If the amount of spots still available is greater than zero, navigate to the Feedback_Successfull screen; otherwise navigate to Feedback
SharePointForm - OnSuccess
If(Value(postili)>0;
Navigate(Feedback_Successfull;ScreenTransition.None);;ResetForm(SharePointForm1);
Navigate(Feedback;ScreenTransition.None);;ResetForm(SharePointForm1))
Feedback_Successfull and Feedback are two screens that contain a button
Button Feedback_Successfull:
ResetForm(SharePointForm1);; RequestHide();;Refresh('My Reservations')
Button Feedback
ResetForm(SharePointForm1);; RequestHide();;Refresh('My Reservations')
Can anyone tell me why when the data is not saved on the SharePoint list?
Probably something is wrong at OnSuccess, but I don't understand what is it.
Thank you in advance 🙂
Solved! Go to Solution.
I fixed it on my own, and all this information was unnecessary.
The from didn't save the data to the database because I unintentionally set the REQUIRED property of a hidden DataCard to =true.
As in this case, It's impossible to save a form if a required field has not been filled in.
I fixed it on my own, and all this information was unnecessary.
The from didn't save the data to the database because I unintentionally set the REQUIRED property of a hidden DataCard to =true.
As in this case, It's impossible to save a form if a required field has not been filled in.