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 / Lookup SP list to see ...
Power Apps
Answered

Lookup SP list to see if item with same name and a certain status exists

(0) ShareShare
ReportReport
Posted on by 15

Hello,

 

I have a canvas app that is used to create Document Change Requests. All change request are stored in a SharePoint list. When using the app to create a new change request, The app can tell a user if a change for the document they have selected is already in the list. This is to stop users logging duplicate requests. However, I need to be able to add a condition to the lookup that checks the status column (status is a choice column in the SharePoint list) and only notifies the user that there is an item if the status is not 'Change Completed' or 'Rejected' 

 

Here is the formula now that notifies the user regardless of status:

If(!IsBlank(LookUp('Technical Change Requests','DocChange Name'=DataCardValue1.Text)),Notify("There is already a pending change for this document",ErrorSeverity.Warning,0)

 

What do I need to do to add the condition regarding the status? 

 

Thank you in advance,

 

 

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @RST101 

     

    With({_items: Filter('Technical Change Requests', Status.Value<>"Change Completed"||"Rejected")
     }, 
     If(
     !IsBlank(
     Lookup(
     _items,'DocChange Name' = DataCardValue1.Text
     )
     ),Notify("There is already a pending change for this 
     Document",NotificationType.Error, 0)
     )
    )

    I am curious about your "ErrorSeverity.Warning,"  I have never seen this as part of a Notify function.  

     

  • RST101 Profile Picture
    15 on at

    ErrorSeverity.Warning is used to display a Yellow Warning banner rather than a red(stop) error banner when using Notify.

     

    I am afraid your formula is not working - I am not getting any errors but its still showing me the notify when adding items with the same DocChange Name and a status of ''Change Completed'' or ''Rejected'' 

     

    Do you have any other suggestions on this?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @RST101 

    Thanks so much for the info on ErrorSeverity

    Do you want to provide the Notification if the entry is already listed as "Change Completed" or "Rejected" in your table?  If so, change the "<>" to "=".

  • RST101 Profile Picture
    15 on at

    I do not want to provide the Notification if the entry is already listed as ''Change Completed'' or ''Rejected''

     

    The Notification should only show if the document name already exists in the list (covered by my formula) and if status of that item is ''Pending Approval'' or ''Approved'' 

     

    I hope this helps - Please let me know if I can help with any more info I have been stuck on this for some time now so any help is appreciated 🙂

     

    Thanks,

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @RST101 

    see above,I revised the post.

    The initial filter should narrow the list to those who have status = completed' or 'rejected'  and the lookup would tell if the person is in the list. 

  • RST101 Profile Picture
    15 on at

    Thank you so much your solution has proven very useful and this is now working as expected!

     

    Thanks Again!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard