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

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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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,594)