I have a Gallery that displays details of Field trips and the people that are on that trip - see screenshot1
I am trying to display the first person's photo only and so have had to create another Gallery (Gallery6) within the main gallery so I can pull out only the first person's name - the Items property for this Gallery is:
First(
Trim(
Split(
Title1.Text,
" "
)
)
)
where Title1 is the label that holds the people's names - they are separated by 2 spaces.
Then the Image I have has the following Image properties:
Office365Users.UserPhoto(
LookUp(
MyDetails,
Trim(Lower(Gallery6.Selected.Result)) in Lower(firstname & " " & surname),
email
)
) where MyDetails is a Sharepoint list of all people that have ever used the app and contains their firstname, surname and email details.
I also have a searchbox (searchbox3) in the header section and it's referenced in the main Gallery's Items property which is:
SortByColumns(
With(
{
_preFilter: Filter(
Trips,
riskrating.Value = "Low" || riskrating.Value = "Medium"
)
},
Filter(
_preFilter,
searchbox_3.Text in officers || searchbox_3.Text in tripid || searchbox_3.Text in approver
)
),
"tripid")
When I don't put anything in the searchbox I get pictures displaying correctly but when I search on a person's name for example, I get unexpected results - screenshot2. I think I am missing something obvious but can't quite figure it out
any help would be greatly appreciated and I hope I have explained my problem clearly
thanks