Hi @Field ,
Does the user has enough permission to the SP List?
How many records stored in your SP list? More than 2000 records?
I assume that the user has enough permission to the SP list. I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Submit" button to following formula:
If(
IsBlank(LookUp('YourSPList', 'Created By'.Email = User().Email)),
SumitForm(EditForm1);Notify("Create an item now", NotificationType.Success),
Notify("You can't add 2 items", NotificationType.Error)
)
In addition, you could also consider set the OnVisible property of the Edit screen to following:
If(
IsBlank(LookUp('YourSPList', 'Created By'.Email = User().Email)),
Notify("Create an item now", NotificationType.Success),
Notify("You can't add 2 items", NotificationType.Error)
)
Set the DisplayMode property of the "Submit" button to following:
If(
EditForm1.Mode = FormMode.New && !IsBlank(LookUp('YourSPList', 'Created By'.Email = User().Email)), /* <-- EditForm1 represents the Edit form in your app */
DisplayMode.Disabled,
DisplayMode.Edit
)
Above LookUp formula may cause a Delegation warning issue, if the amount of your SP List records is not more than 2000, you could ignore this warning issue. Please consider set the "Data row limit for Non-delegable queries" option within the Advanced settings of App settings of your app to maximum value -- 2000. Then you could process 2000 records in your app locally at most.
More details about the Delegation in PowerApps, please check the following article:
Delegation
If the amount of your SP List is more than 2000, please check and see if the alternative solution mentioned within the following thread would help in your scenario:
https://powerusers.microsoft.com/t5/General-Discussion/Pulling-in-large-ish-SQL-tables/m-p/243777#M71518
Set the OnStart property of the App control to following (I assume that there are 10000 records in your SP list):
Concurrent(
ClearCollect(col1, Filter('YourSPList', ID >= 1 && ID <= 2000)),
ClearCollect(col2, Filter('YourSPList', ID >= 2001 && ID <= 4000)),
ClearCollect(col3, Filter('YourSPList', ID >= 4001 && ID <= 6000)),
ClearCollect(col4, Filter('YourSPList', ID >= 6001 && ID <= 8000)),
ClearCollect(col5, Filter('YourSPList', ID >= 8001 && ID <= 10000))
);
ClearCollect(MergedCollection, col1, col2, col3, col4, col5)
Then modify above formula as below:
If(
IsBlank(LookUp(MergedCollection, 'Created By'.Email = User().Email)), /* ues MergedCollection as data source instead of Original SP List */
SumitForm(EditForm1);Notify("Create an item now", NotificationType.Success),
Notify("You can't add 2 items", NotificationType.Error)
)
...
then re-load your app, check if the issue is solved.
Best regards,