Hello, I can't really make out how to reference an Email of a person/group type in my SP list and use it in a Search function.
I have a gallery that searches for the Holiday Hours of the user with respect to Email and its Title but it always returns an error. I have a separate app with the exact same code but the only difference is that its SP list column for Email is of a single line of text type and it works fine. I've used Emails.Email, User().Email = Emails.Emails, "Emails".Email nothing works.
If(IsBlank(Sum(Search(leaveDetailsGallery.AllItems, ThisItem.Title, "Emails"),HolidayHours )),0,Sum(Search(leaveDetailsGallery.AllItems,ThisItem.Title,"Emails"),HolidayHours))
Pardon the delegation warnings. I'll work on that now.
Solved! Go to Solution.
Hi @Revlock97 ,
Try this
With(
{
wHours:
Sum(
Filter(
leaveDetailsGallery.AllItems,
Emails = ThisItem.Title
),
HolidayHours
)
},
If(
wHours > 0,
wHours,
0
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Revlock97 ,
Yes, that column type is problematic with Power Apps (I do not use them) and you need to be aware of the limitations at times. Try this
With(
{
StartDate: Date(2021,9,2),
StartDateNow: Today()
},
Sort(
Search(
AddColumns(
Filter(
colTeamCalendar2,
'Start Time' >= StartDate Or 'Start Time' <= StartDateNow
),
"EmailAddress",
Emails.Email
),
txtSearcHistory.Text,
"Title",
"EmailAddress"
),
'Start Time',
Descending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Revlock97 ,
Try this
With(
{
wHours:
Sum(
Filter(
leaveDetailsGallery.AllItems,
Emails = ThisItem.Title
),
HolidayHours
)
},
If(
wHours > 0,
wHours,
0
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
@WarrenBelz Sorry but I don't suppose you could help me in referencing it using the Search function and the input.Text of a search bar?
With(
{
StartDate: Date(2021,9,1) + 1,
StartDateNow: Date(Year(Today()),Month(Today()),Day(Today()))
},
Sort(Search(Filter(
colTeamCalendar2,'Start Time' >= StartDate Or 'Start Time' <= StartDateNow),txtSearcHistory.Text,"Title","Emails"),'Start Time',Descending
)
)
This is the code that worked when the Emails was still a single line of text type. But I still don't know how to incorporate it now that it is of a Group/Person type. I tried using the With function like in the Filter code you gave me but it doesn't work for Search.Text references.
Hi @Revlock97 ,
Yes, that column type is problematic with Power Apps (I do not use them) and you need to be aware of the limitations at times. Try this
With(
{
StartDate: Date(2021,9,2),
StartDateNow: Today()
},
Sort(
Search(
AddColumns(
Filter(
colTeamCalendar2,
'Start Time' >= StartDate Or 'Start Time' <= StartDateNow
),
"EmailAddress",
Emails.Email
),
txtSearcHistory.Text,
"Title",
"EmailAddress"
),
'Start Time',
Descending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
183 | |
46 | |
46 | |
34 | |
33 |
User | Count |
---|---|
254 | |
83 | |
78 | |
67 | |
66 |