Preventing duplicate field data - InfoPath Dev
in

InfoPath Dev

Preventing duplicate field data

Last post 01-27-2016 09:21 PM by Andreaa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-07-2013 10:11 AM

    Preventing duplicate field data

     Hi,

     

    Here is what I'm trying to accomplish.  I have a field named "Memo Number" in my sharepoint list/infopath form called "List A". When a user adds data to the Memo Number field and hits submit I want to query the same field and list to find if the number entered in the memo number field already exists in another record in the list. If so, I want to point the user to an error message view that prohibits them from saving the data. I'm not quite sure of the best way to query and compare the data. I can create the rules to prevent and display the error message view no problem. This is probably really simple, but sometime I over complicate things!!   :)

  • 12-09-2013 01:06 AM In reply to

    Hi Ghoztrider,

    This one's a bit tricky. I've written down a couple of steps for you to follow:

    • Add a Validity Boolean field with a default value of TRUE
    • Add a retrieve data connection to the List

    • When the field is changed, execute these actions:
    1. Use the entered Item as a filter value in the List data connection, and query the data.

    2. set Validity to the value of this formula: not(SharePointListItem)

     - where SharePointListItem is the repeating group from that connection

    • Add a calulated value box with this text with an error message - hide it when Validity is true.
    • Disable the Submit button when Validity is not true.

    I'm also attaching a sample form for reference. Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 12-09-2013 12:28 PM In reply to

    Re: Preventing duplicate field data

    Thanks Don, I appreciate the reply and the instructions and sample. I am going to break this down now and see what I can do. I'll post back when I'm done!

     

  • 12-11-2013 10:17 AM In reply to

    Re: Preventing duplicate field data

     It's working, Thanks again!

  • 01-27-2016 09:21 PM In reply to

    Re: Preventing duplicate field data

    Hello donstepehn, I tried your solution but it does not let me to send any data, (Always the submit button is hidden) I am thinking that my error can be the data connection step. Is there a way that you take a look to my file? If yes, I would like to sent it to you dierctly to your email...
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.