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 / Validate to avoid dupl...
Power Apps
Answered

Validate to avoid duplicate

(0) ShareShare
ReportReport
Posted on by 65

Good afternoon friends,

I am making an application to be used in my company's production process, and I need to validate two data.

I use a sharepoint list, so I have a column with serial number and status.

When someone makes a new form he informs the serial number and the status of the equipment. Let's say the number is 800800-9 and the status is "In progress"

So I want it not to be possible to open a new form for the serial number 800800-9 while the status is in progress, only if it has been completed.

Thank you

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Try

    If(!IsBlank(LookUp(Datasource, 'Serial Number' = "800800-9" && (Status.Value= "Completed"))),
    SubmitForm(Form2),
    Notify("Number already exist or not complete) )

    ------------

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

  • straiderox2 Profile Picture
    65 on at

    Hello @eka24 

    It worked friend, thank you very much.
    But now I found another problem 😞
    If it is a new item, the Status field is blank, as it does not yet exist, so I cannot submit the form.
    I tried to add the number 800800-8 it appears the message of notify and not saved. is it possible to make a variable that accepts if the Status field is blank?

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    If(!IsBlank(LookUp(Datasource, 'Serial Number' = "800800-9" && (Status.Value= "Completed" || IsBlank(Status.Value) ))),
        SubmitForm(Form2),
        Notify("Number already exist or not complete)
    )

  • eka24 Profile Picture
    20,925 on at

    If(IsBlank(LookUp(Datasource, 'Serial Number' = "800800-9" && (Status.Value<> "Completed"))),
    SubmitForm(Form2),
    Notify("Number already exist or not complete) )

    ------------

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

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@straiderox2

    Could you please share a bit more about your scenario?

    Do you want to avoid submitting duplicated record which has same Serial Numbers with "In Progress" status?

    To achieve this, you need to validate that if the current serial number under creating has been in  "In progress" status.

    I have a test on my side, please take a try as below.

    Set the OnSelect property of the Submit button as below

     

    If(
     IsBlank(
     LookUp(
     ProductionProcess,
     'SerialNumber' = DataCardValue5.Text && (Status.Value = "In progress")
     )
     ),
     SubmitForm(EditForm1),
     Notify(
     "The same Serial Number has been submitted!",
     NotificationType.Error
     )
    )

     

    Note: The 'Serial Number' column is a Text column and the Status column is a Choice type column in your SP list. DataCardValue5 represents the corresponding control to the 'Serial Number' data card.

    Please check the Gif as below.

    0803Gif02.gif

    Best Regards,

    Qi

  • straiderox2 Profile Picture
    65 on at

    Thanks to everyone, take a little bit of each solution and implant it in the application.

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
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard