cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Lookup/Filter/Search Sharepoint Lists to toggle visibility of a registration icon if user email matches in registered list

I am building an event PA and am using 3 SharePoint lists :

Event(Title, ID)

EventSession(Title, Description, Event:ID)

EventSessionRegistration (UserName, UserEmail, EventSession:ID)

Event:ID and EventSession:ID are lookup columns. Each Event can have multiple EventSessions.

 

2 Gallerys (One for Event and one for EventSessions related to selected Event)

EventSessions has a register button I am trying to either show or hide based on if the user has registered for that EventSession.

 

OnSelect for the Event gallery(galEvents) is 

ClearCollect(colEventSessions, Filter(Sessions, 'Event:ID'.Id = varEventRecord.ID))

Then the Items for the EventSessions gallery (galEventSessions)  is just the collection from above (colEventSessions).

 

My thought was to have an 

"If (IsBlank( Filter/Lookup/Search for User Email in EventSessionRegistration where ThisItem.ID =  EventSessionRegistration.EventSession:ID ) true, false"

  to set visibility on the register icon....

But I must be missing something because it will return all true or all false. I am new to PA obviously. Any help or links will be greatly appreciated.

 

Best regards,

Hank

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Advocate V
Advocate V

Re: Lookup/Filter/Search Sharepoint Lists to toggle visibility of a registration icon if user email matches in registered list

Hi Hank,

 

I'm doing something similar in one of my apps - changing visibility of an icon based on whether there is a calendar event that day.

 

/*Visible if calendar events are found on this day*/
!IsEmpty(
    Filter(
        'Calendar_SP_List',
        'Event Start Date' <= DateAdd(_FirstDayInView, ThisItem.Value, Days),
        'Event End Date' >= DateAdd(_FirstDayInView, ThisItem.Value, Days)
    )
)

 

If we modify this a bit for your situation, maybe something like this. It's probably not perfect, but this might give you an idea on how to start.

/* Visible if user is NOT already registered */
!IsEmpty(
  Filter(
    'EventSessionRegistration',
    'EventSession:ID' = ThisItem.ID,
    'UserEmail' = (USER_ENTERED_EMAIL_ADDR)
   )
)

 

View solution in original post

Highlighted
Community Support
Community Support

Re: Lookup/Filter/Search Sharepoint Lists to toggle visibility of a registration icon if user email matches in registered list

Hi @HankHepler3M ,

Do you want to hide or visible the "Register" button within your EventSessions Gallery?

 

Regarding the formula that you mentioned, I think there is something wrong with it. Please try the following workaround:

Set the Items property of the EventSessions Gallery (galEventSessions) to following:

Filter(Sessions, 'Event:ID'.Id = galEvents.Selected.ID)

 

Set the Visible property of the "Register" button in your EventSessions Gallery to following:

If(
    IsBlank(LookUp(EventSessionRegistration, 'EventSession:ID'.Id = ThisItem.ID && UserEmail = User().Email)),
    true,
    false
)

or

If(
    IsEmpty(Filter(EventSessionRegistration, 'EventSession:ID'.Id = ThisItem.ID, UserEmail = User().Email)),
    true,
    false
)

 

Please try above solution, then check if the issue is solved.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Advocate V
Advocate V

Re: Lookup/Filter/Search Sharepoint Lists to toggle visibility of a registration icon if user email matches in registered list

Hi Hank,

 

I'm doing something similar in one of my apps - changing visibility of an icon based on whether there is a calendar event that day.

 

/*Visible if calendar events are found on this day*/
!IsEmpty(
    Filter(
        'Calendar_SP_List',
        'Event Start Date' <= DateAdd(_FirstDayInView, ThisItem.Value, Days),
        'Event End Date' >= DateAdd(_FirstDayInView, ThisItem.Value, Days)
    )
)

 

If we modify this a bit for your situation, maybe something like this. It's probably not perfect, but this might give you an idea on how to start.

/* Visible if user is NOT already registered */
!IsEmpty(
  Filter(
    'EventSessionRegistration',
    'EventSession:ID' = ThisItem.ID,
    'UserEmail' = (USER_ENTERED_EMAIL_ADDR)
   )
)

 

View solution in original post

Highlighted
Frequent Visitor

Re: Lookup/Filter/Search Sharepoint Lists to toggle visibility of a registration icon if user email matches in registered list

Well you made it look to easy lol! Makes sense... thank you for your help! I will give it a try 🙂

 

Thanks,

Hank

Highlighted
Community Support
Community Support

Re: Lookup/Filter/Search Sharepoint Lists to toggle visibility of a registration icon if user email matches in registered list

Hi @HankHepler3M ,

Do you want to hide or visible the "Register" button within your EventSessions Gallery?

 

Regarding the formula that you mentioned, I think there is something wrong with it. Please try the following workaround:

Set the Items property of the EventSessions Gallery (galEventSessions) to following:

Filter(Sessions, 'Event:ID'.Id = galEvents.Selected.ID)

 

Set the Visible property of the "Register" button in your EventSessions Gallery to following:

If(
    IsBlank(LookUp(EventSessionRegistration, 'EventSession:ID'.Id = ThisItem.ID && UserEmail = User().Email)),
    true,
    false
)

or

If(
    IsEmpty(Filter(EventSessionRegistration, 'EventSession:ID'.Id = ThisItem.ID, UserEmail = User().Email)),
    true,
    false
)

 

Please try above solution, then check if the issue is solved.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: Lookup/Filter/Search Sharepoint Lists to toggle visibility of a registration icon if user email matches in registered list

Thanks Kris, I used the other response. However, your response about using IsBlank() for a lookup and IsEmpty() for a filter helped me solve another problem! 

 

Hank

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,128)