Re: Filter a gallery by textinput
The error you are encountering may be related to the fact that some of the items in your gallery do not have a valid email address associated with them, or that the email address is not recognized by the 'Office365-Benutzer'.UserPhotoV2() function.
To work around this issue, you may need to add a condition to your formula that checks if the email address is valid before calling the UserPhotoV2() function. Here is an example of how you can modify your formula to include this condition:
Filter(Berater,
Pos.Selected.Position = Position &&
If(
IsMatch(ThisItem.Mitarbeiter.Email, Match.Email),
Lower(ThisItem.Mitarbeiter.DisplayName) = Lower(TextInput1.Text),
false
)
)
This formula checks if the email address of the current item in the gallery is a valid email address using the IsMatch() function with the Match.Email pattern. If the email address is valid, it then compares the lowercase display name of the current item to the lowercase text input value. If they match, the item is included in the filtered gallery; otherwise, it is excluded.
Note that this formula assumes that the email address of each item in the gallery is stored in a field called "Email" within the "Mitarbeiter" field of each record in the "Berater" data source. You may need to adjust the formula to match the specific structure of your data source.
If you feel that my response has helped you, please consider giving it a thumbs up and please mark it as the solution. This will help other community members find the solution quickly if they have a similar issue in the future.