Hi,
I am trying to update my status based on the check of a checkbox.
I want to update each record in my browsegallery every time i check the box. I want to switch the status to Complete.
Trying this for patch -
Patch(['Data Source'], ThisItem.Status_two.Value, Status_two.Value = "Complete")
also trying this -
Patch(['Data Source'], ThisItem.Status_two , {Status_two:Complete})
where am I going wrong?
@TheRobRush after fiddling around with it.. its working now.. thanks for your patience!!!
maybe just use the new gallery haha, something must be wrong with the old one. try adding the last sort part back to new one see if that breaks it or not haha
SortByColumns(
Filter(
'Data Source',
If(
Dropdown3.Selected.Value = "Filter for Request Status",
Status_two.Value = "New Request" Or Status_two.Value = "GCO Assessment" Or Status_two.Value = "Complete",
Status_two.Value = Dropdown3.Selected.Value
)
And
If(
Filter_for_GCO_Lead.Selected.Value = "Filter for GCO Lead",
'GCO Lead_three' = "email@gmail.com" Or 'GCO Lead_three' = "email2@gmail.com",
'GCO Lead_three' = Filter_for_GCO_Lead.Selected.Value
)
And
(StartsWith(
Control_two.Value,
'search box'.Text
)
Or
StartsWith(
ID_three,
'search box'.Text
))
),
"Title",
If(
SortDescending1,
SortOrder.Descending,
SortOrder.Ascending
)
)
@TheRobRush ok so i put the above code in the items of my new gallery, the button still works and changes the status! tried it narrowing it briefly in my old gallery and thats still broken.. hmm..
Ok so lets undress it until it works. change that new gallery to
Filter(
'Data Source',
If(
Dropdown3.Selected.Value = "Filter for Request Status",
Status_two.Value = "New Request" Or Status_two.Value = "GCO Assessment" Or Status_two.Value = "Complete",
Status_two.Value = Dropdown3.Selected.Value
)
And
If(
Filter_for_GCO_Lead.Selected.Value = "Filter for GCO Lead",
'GCO Lead_three' = "email@gmail.com" Or 'GCO Lead_three' = "email2@gmail.com",
'GCO Lead_three' = Filter_for_GCO_Lead.Selected.Value
)
And
(StartsWith(
Control_two.Value,
'search box'.Text
)
Or
StartsWith(
ID_three,
'search box'.Text
))
)
and see if it rebreaks
Yup so when I do a vertical gallery, add a button, on select add what you have above, the status changes and is doing the correct action lol. sigh this is so confusing.
just to see if it changes, place a gallery in the app with just the bare sharepoint list as the source (none of the filters sorts etc) and just place a button in there that does
Patch('Data Source', ThisItem, {Status_two: {Value:"Complete"}})
and see if it gives you same issue, maybe narrow down whats happening
go to your sharepoint list, in upper right click the gear symbol and click list settings, then on next screen click the name of column 'Status_two' then look in address bar to make sure column name is ACTUALLY status_two, sometimes they ar enot
see image
BrowseGallery1 Items code -
SortByColumns(
Filter(
[@'Data Source'],
If(
Dropdown3.Selected.Value = "Filter for Request Status",
Status_two.Value = "New Request" Or Status_two.Value = "GCO Assessment" Or Status_two.Value = "Complete",
Status_two.Value = Dropdown3.Selected.Value
)
And
If(
Filter_for_GCO_Lead.Selected.Value = "Filter for GCO Lead",
'GCO Lead_three' = "email@gmail.com" Or 'GCO Lead_three' = "email2@gmail.com",
'GCO Lead_three' = Filter_for_GCO_Lead.Selected.Value
)
And
(StartsWith(
Control_two.Value,
'search box'.Text
)
Or
StartsWith(
ID_three,
'search box'.Text
))
),
"Title",
If(
SortDescending1,
SortOrder.Descending,
SortOrder.Ascending
)
)
what is the gallery items code
WarrenBelz
146,587
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional