cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vadiraj1100
Helper I
Helper I

Avoid current user to duplicate the registration

Hi All,

 

I have a sp list which will be updated by the form using canvas app.

 

Each entry will have Team including 5 team members. eg  mem1@g.com , mem2@g.com  .... mem5@g.com

Now if any of the user from this entry comes and try to register it should check the current logged in user with the entry and if the user exists in the entry he should be navigated to "Already Registered" page , Else he should be navigated to "Home Page"

where he can continue to register as usual.

 

I have tried On start of App

If(IsBlank(LookUp('List name', User().Email ='Team Member 1 - Mail'.Email)),Navigate('Already Registered',ScreenTransition.Fade),Navigate('Home Screen',ScreenTransition.None))

 

Not sure what is going wrong here but the new user is also prompted to Already registered page. Even if he is not part of any entry.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@vadiraj1100 
Give this a try.  In your formula, the logic implies that if the Lookup is blank (meaning that the person signing in is not already in your list, then you will be directed towards the already registered page.  I don't think this is what you intended.  My formula looks to see if the lookup is NOT blank, meaning the person signing in is already in your list. Then they will be directed to the already registered screen.  In addition, please  make sure that your list accurately reflects the User's email when they sign in. 

Set(Useremail,User().Email);
Collect(collist,'List name');
If(
    !IsBlank(
              LookUp(collist, 'Team Member 1 - Mail'.Email = useremail
             ), Navigate(
                          'Already Registered',ScreenTransition.Fade
                ), Navigate(
                             'Home Screen')
                    )
)


 

View solution in original post

10 REPLIES 10
CNT
Super User
Super User

@vadiraj1100 The condition should probably be 'Team Member 1 - Mail'.Email=User().Email

Drrickryp
Super User
Super User

@vadiraj1100 

What happens if you change the

IsBlank to !IsBlank.

Hi @CNT ,

 

No this change didnt work, Are you sure the code i am using is the right one for my requirement? Do you have any suggestion

Hi @Drrickryp ,

 

No this change didnt work, Are you sure the code i am using is the right one for my requirement? Do you have any suggestion

Drrickryp
Super User
Super User

I didn't ask if it worked, I asked what happened? Did it go to the other screen?

Sorry, Nope it didnt go to another screen.

Drrickryp
Super User
Super User

@vadiraj1100 

I suspect the logic isn't working because the data for the comparison is not available in the OnStart. Try to collect the data in the list first and then run your formula against the collection.

I have entered my name in the Team Member 1 - Mail and submitted the form .. If i try to access the application it should essentially prompt me to Already Registered page .. But that is not Happening 

 

@vadiraj1100 
Give this a try.  In your formula, the logic implies that if the Lookup is blank (meaning that the person signing in is not already in your list, then you will be directed towards the already registered page.  I don't think this is what you intended.  My formula looks to see if the lookup is NOT blank, meaning the person signing in is already in your list. Then they will be directed to the already registered screen.  In addition, please  make sure that your list accurately reflects the User's email when they sign in. 

Set(Useremail,User().Email);
Collect(collist,'List name');
If(
    !IsBlank(
              LookUp(collist, 'Team Member 1 - Mail'.Email = useremail
             ), Navigate(
                          'Already Registered',ScreenTransition.Fade
                ), Navigate(
                             'Home Screen')
                    )
)


 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,165)