I have been trying to patch my repeating table (gallery with multiple rows) to my SharePoint list, however it keeps copying the data from the last row to all of the added rows. See code for submit button, add event button, and the results of the patch button.
Additionally, the two collections in the app are blank when clicking the patch button. It only shows one column populated.
Help on this will be greatly appreciated!
Add event button:
Submit Button:
Gallery:
ColSelectedMeals:
ColMealDetails:
SharePoint List after Submit button (patch)
Hi @NPatel12498,
This is very strange as in the course of this topic you have posted two contrasting error messages:
This was posted first, stating 'RequiredMeals' is a text column:
In you most recent post it is now stating 'RequiredMeals' is a mutitselect choice column (or similar):
The formula I posted was based on the first error, where I was trying to push a text to 'RequiredMeals', but now that is not working because the column type has changed. Did you do that?
If 'RequiredMeals' is indeed expects a table, please try:
Patch(
ColMealDetails,
ThisItem,
{
TitleID: TitleID.Text,
EventDate: Eventdate.SelectedDate,
RequiredMeals: RequiredMeals.SelectedItems,
EventDuration: EventDuration.Text,
****Attendees: ****Attendees.Text,
Non****Attendees: Non****Attendees.Text
}
)
Hi,
There are no squiggly lines at all showing in the formula. But all of the input fields I am putting the formula for the OnChange property are showing red x's. Do you think maybe the other formulas within the Add Event button are causing the error?
Add event button formula:
Here's the formula bar:
Here is the error message within the flow checker that is appearing for each input field:
These are the red x's:
Disregard the input field below required meals.
Hi @NPatel12498,
Based on what you're showing me, this should be working. Can you please post the screenshot that includes the red squiggly lines to indicate where in the formula the issue is?
This is still not working and it is giving the same errors.
Here is the display fields for RequiredMeals:
Hi @NPatel12498 ,
Thanks for the detailed error text. The below should fix the issue:
Patch(
ColMealDetails,
ThisItem,
{
TitleID: TitleID.Text,
EventDate: Eventdate.SelectedDate,
RequiredMeals: Concat(RequiredMeals.SelectedItems, Value, ", "),
EventDuration: EventDuration.Text,
****Attendees: ****Attendees.Text,
Non****Attendees: Non****Attendees.Text
}
)
If this doesn't work, please share the DisplayFields property of the RequiredMeals combo box.
There are no errors displayed with red lines in the formula bar, but in the flow checker there are errors. Additionally required meals is a multi select column, up to 3 values can be selected within this dropdown. It is supposed to be collected as a collection because of that reason. See below
Hi @NPatel12498 ,
Apologies, I got some things mixed up before. Please try:
Patch(
ColMealDetails,
ThisItem,
{
TitleID: TitleID.Text,
EventDate: Eventdate.SelectedDate,
RequiredMeals: RequiredMeals.SelectedItems,
EventDuration: EventDuration.Text,
****Attendees: ****Attendees.Text,
Non****Attendees: Non****Attendees.Text
}
)
What is important, is that the names of the controls are in the function correctly. For instance I found a typo in EventDate. For saftery, can you share a screenshot that shows the names of the controls in the gallery?
Patch(
ColMealDetails,
ThisItem,
{
TitleID: ThisItem.TitleID,
EventDate: ThisItem.Evendate,
RequiredMeals: ThisItem.RequiredMeals,
EventDuration: ThisItem.EventDuration,
****Attendees: ThisItem.****Attendees,
Non****Attendees: ThisItem.Non****Attendees
}
)
The code has less errors after I take out the .text, .selecteddate out of the formula. But this is what I have currently and it is still throwing errors. Disregard the **** that is just data protection on my end.
Hi,
I have adjusted the formula with the correct column names but it is still giving me errors.
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional