@Becca_Hayes
Yes it's possible @Becca_Hayes
Let me tell you the difference between using the SharePoint List way and not using it, to enforce uniqueness.
To enforce unique values in a SharePoint list:
1. Go to your SharePoint List and then, click on the name of the column that you want to enforce unique values on (in this case, it's the User Email column).
2. Click on "Column settings" and then "Edit".
3. In the column settings, you should find a checkbox saying "Enforce unique values".
Check it and save your changes.
This should enforce unique values for that column in the SharePoint list, meaning no two items in the list can have the same value in this column.
However, you've mentioned that you do not want to enforce this uniqueness constraint on the SharePoint list itself as there's one group of users who should be able to enter multiple items with the same email. This is why enforcing the constraint on the Power Apps side, not on the SharePoint list itself, would be more suitable for your scenario.
Enforcing unique values in Power Apps:
1. In your Power App, select the 'Submit' button that users use to submit the form.
2. In the OnSelect property of the button, write a formula to check whether the email a user entered already exists in the SharePoint list. If it does, show an error message and prevent the form from being submitted:
If(
IsBlank(
LookUp(
YourSharePointList,
EmailColumnName = TextInput1.Text
)
),
SubmitForm(YourFormName), // submit the form if email is unique
Notify("This email has already been used. Please enter a different email.", NotificationType.Error)
)
This formula uses the IsBlank function to check if the result of the LookUp function returns a record (i.e., no item in the SharePoint list has the same email). If it is blank, the formula submits the form. If it's not, the formula shows a notification to the user.
Remember to replace 'YourSharePointList', 'EmailColumnName', 'TextInput1', and 'YourFormName' with your actual SharePoint list name, the email column name, the actual TextInput control where users input their email, and the actual form name, respectively.
With this approach, you're implementing the uniqueness constraint only in your Power App, not in your SharePoint list. Users who use the Power App to submit data will be constrained by this rule, but users who have access to the SharePoint list itself will not be constrained.
Hope it helps @Becca_Hayes