So i have this gallery that contains a list of horse.
With({Listefilter:SortByColumns(
Switch(
DropdownHorse.SelectedText.Value;
"All";Search(Horses;searchText.Text;"Name");
"Stable";Search(Filter(Horses;'LocalId:Name'.Value="Stable");searchText.Text;"Name");
"equestrian centrer";Search(Filter(Horses;'LocalId:Name'.Value="equestrian centre");searchText.Text;"Name");
"Reproduction";Search(Filter(Horses;'LocalId:Name'.Value="Reproduction");searchText.Text;"Name")
);sortColumn;If(sortName;Ascending;Descending))};If(Checkbox2.Value;Listefilter;Filter(Listefilter;!IsBlank(ThisRecord.detailproblem.'ProblemeID:Description'.Value))))
What i want to to do is add another filter that check if an horse have at least a problems, but since a horse can have many problems and a problems can be assign to many horses, it must be put in a related table with both ID as lookup field.
what i tried to do was add a column that lookup the "detailproblem" wich is the problem related to the horse with unique data.
AddColumns(Horses;"detailproblem";LookUp(DetailProblem;HorseID.Value=Horse[@ID])
it work except it broke the part i want to navigate with the selected item. since it had a new column. How can i filter my horses if they have at least one problem in the detailproblem list?

Report
All responses (
Answers (