I want to filter a gallery by the text input. The data are from sharepoint and the filter should filter by the names of the people. Every profile of the gallery has a picture from from themselves.
When i use Filter(Berater; Pos.Selected.Position = Position; TextInput1.Text = Name) , it compiles but when i run it i get an error on this code:
'Office365-Benutzer'.UserPhotoV2(ThisItem.Mitarbeiter.Email)
i fixed now the code by adding to the image in the gallery this code
If(!IsBlank(ThisItem.Mitarbeiter); 'Office365-Benutzer'.UserPhotoV2(ThisItem.Mitarbeiter.Email))
and so this code compiles and runs but if i put a name in the textinput it does not do anything not filtering.
Filter(Berater; Pos.Selected.Position = Position; TextInput1.Text = Name)
There is warning about delegation and data sets, could this be a reason ?
first of all thank you, in my case i have to use semicolon instead commas but i still get issues.
Filter(Berater;
Pos.Selected.Position = Position &&
If(
IsMatch(ThisItem.Mitarbeiter.Email; Match.Email);
Lower(ThisItem.Mitarbeiter.DisplayName) = Lower(TextInput1.Text);
false
)
He still shows me error like in ismatch and lower method
in the lower and match method he cannot work with "." and he says lower has invalid arguments
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.
i always get the error The method 'UserPhotoV2' has an invalid value for parameter 'id'
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473