Ah right sorry. I thought I copied the whole formula. And just to make sure, I want to see if I can filter the data based on a lookup. My primary problem is that when I change a value, I not only want to see the value changed on the row, but also I want to see that value's company change as well. And for the row to disappear from the gallery if it does not fit with the current filter on the gallery
For ex.) If I change the row's compid, I want to see that row's company, let's say Walmart, to automatically change to another company, let's say Microsoft. And if the current gallery is filtered based on Walmart, I do not want to see the row I just changed on the gallery because I just edited it.
SortByColumns(
Search(
If(
And(
IsBlank(Combobox1.Selected.Result),
IsBlank(Combobox2.Selected.Result)
),
Filter(
'Sharepoint List',
Company = LookUp(companyList, CompanyID=CompID, Title),
'Starting Date' >= From_2.SelectedDate,
'End Date' <= To_1.SelectedDate
),
If(
And(
IsBlank(Combobox1.Selected.Result),
!IsBlank(Combobox2.Selected.Result)
),
Filter(
'Sharepoint List',
Company = LookUp(companyList, CompanyID=CompID, Title),
'Starting Date' >= From_2.SelectedDate,
'End Date' <= To_1.SelectedDate
'Column_2' = Combobox2.Selected.Result),
If(
And(
!IsBlank(Combobox1.Selected.Result),
IsBlank(Combobox2.Selected.Result)
),
Filter(
'Sharepoint List',
Company = LookUp(companyList, CompanyID=CompID, Title),
),
'Starting Date' >= From_2.SelectedDate,
'End Date' <= To_1.SelectedDate
'Column_1' = Combobox1.Selected.Result
),
If(
And(
!IsBlank(Combobox1.Selected.Result),
!IsBlank(Combobox2.Selected.Result)
),
Filter(
'Sharepoint List',
Company = LookUp(companyList, CompanyID=CompID, Title),
'Starting Date' >= From.SelectedDate,
'End Date' <= To.SelectedDate,
'Column_1' = Combobox1.Selected.Result,
'Column_2' = Combobox2.Selected.Result
)
)
)
)
),
'TextInput1'.Text,
"field_14"
),
varSortPriority,
If(
SortDescending,
Ascending,
Descending
)
)