web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Check if user has crea...
Power Apps
Answered

Check if user has created an Sharepoint list item

(0) ShareShare
ReportReport
Posted on by 339

Hello there,

 

I want to know if a the current user has created a Item in the list.

If it did, it would say "You can't add 2 items", if the user didn't it would say "Create an item now".

How can i achieve this?

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Field 

     

    Can you try using the below expression:
     
    If(IsEmpty(Filter(TestList123,'Created By'.Email = User().Email)),"Create an Item Now","You can't add 2 Items")
     
    This is a sample snippet that can be put on a label, please replace TestList123 with the actual name of your DataSOurce.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Field Profile Picture
    339 on at

    I have tried this, and it doesn't work. He won't check the list.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Field 

     

    are you getting any error?Can you share a screenshot. 
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard