cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidvo68
Helper II
Helper II

Compare Users in a Collection

I need help please.

I have a collection below to capture email of the logged in user.

I have a SAVE button which displaymode=EDIT only when the logged in user email is not in the collection.

varLoginUser is a global variable set to USER() function.

I got an error with my SAVE button.  Can you advise?

Thank you.

Collection

ClearCollect(colsubmittedusers,{SubmittedUser: varLoginUser.Email});

/*************************************************************************************************/

SAVE Button with onselect propery

If(Filter(colsubmittedusers, SubmittedUser.Email = User().Email),DisplayMode.Disabled,Edit)

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Microsoft
Microsoft

Hi @davidvo68 ,

 

I suggest you change your formula to: 

If(IsEmpty(Filter(colsubmittedusers, SubmittedUser.Email = User().Email)),DisplayMode.Disabled,Edit). 

Put the formula in the DisplayMode property of the button.

 

Best Regards,

Levi

 

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

@davidvo68 

The OnSelect property is not the right place for your formula.  You need to put it in the DisplayMode property of the button.  

Other than that, I don't have any idea what you are trying to do.

v-liwei-msft
Microsoft
Microsoft

Hi @davidvo68 ,

 

I suggest you change your formula to: 

If(IsEmpty(Filter(colsubmittedusers, SubmittedUser.Email = User().Email)),DisplayMode.Disabled,Edit). 

Put the formula in the DisplayMode property of the button.

 

Best Regards,

Levi

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,109)