cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
claudia
Helper III
Helper III

Check if a record already exist in the datasource

Hi All,

 

I have the following scenario:

1. the user want to create a new record in a SP list

2. The first field which must be completed by the user is: Title (this is a text field)

3. After the user finish to complete the "Title" and he press Enter, in case the filed value exist in the SP list, the user should receive a warning.

 

My App have multiple screens.

 

How can I check if the value exist in the SP list, straight after the user press Enter?

 

 

Thank you

Claudia

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Eelman
Super User
Super User

@claudia 

You can use CountRows & Filter to check this. I assume they are enter the Title value into an Text Input field so you can set the OnChange property of that field to

 

Set( vRecordCount, CountRows(Filter( yourDataSourceName, Title = TextInput1.Text)) )

 

Then set a label properties to

Text property = "This record already exists."

Visible property = vRecordCount > 0

 

View solution in original post

JR-BejeweledOne
Super User
Super User

You would need to do a lookup to your datasource.   Something like this:

 

 

If(
    CountRows(Filter(DataSourceList, Title = TextBox.Text)) >0,

    Notify("Your Notification Text Here", Error)
    )

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

4 REPLIES 4
Eelman
Super User
Super User

@claudia 

You can use CountRows & Filter to check this. I assume they are enter the Title value into an Text Input field so you can set the OnChange property of that field to

 

Set( vRecordCount, CountRows(Filter( yourDataSourceName, Title = TextInput1.Text)) )

 

Then set a label properties to

Text property = "This record already exists."

Visible property = vRecordCount > 0

 

View solution in original post

JR-BejeweledOne
Super User
Super User

You would need to do a lookup to your datasource.   Something like this:

 

 

If(
    CountRows(Filter(DataSourceList, Title = TextBox.Text)) >0,

    Notify("Your Notification Text Here", Error)
    )

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

Thank you!!

Thank you very much!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,341)