Need to throw an error message when the typed value does not match with SharePoint list - InfoPath Dev
in

InfoPath Dev

Need to throw an error message when the typed value does not match with SharePoint list

Last post 07-01-2013 02:58 PM by jseeker. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 06-26-2013 11:07 AM

    Need to throw an error message when the typed value does not match with SharePoint list

    Hi,

    I have configured the InfoPath textbox control to accept user input (Unique Employee ID) and

    1. Check for typed user input against SharePoint list and pull corresponding Job Title, Pay grade and other information - It fetches values when it matches and populates other textbox controls per configuration.

    2. When the typed Employee ID does not find a match (because the typed user input is wrong) in the backend SharePoint list, I need infopath to throw an error message.

    I tried configuring the Employee ID text box with a rule. The rule (with 2 conditions) checks and (should) provides an error message when

    1. Employee id is NOT blank AND (typed) Employee ID does NOT find a match with Employee ID in Sharepoint list

    The problem is, InfoPath is showing the Red outline (indicating error) around the Employee ID textbox control  irrespective of whether it finds a match or otherwise.

    Thanks in advance. Please let me know if additional information is required. 

    Thanks

  • 06-28-2013 12:59 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

     So - sounds like your custom validation is incorrect? What does that look like? You can attach a screenshot under the Options tab.

    Hilary Stoupa

  • 06-28-2013 01:19 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

    Hi Hilary,

    Thanks for your email. 

    I have attached the validation here. Please let me know if that is what you had asked for.

    Thanks

     


  • 06-28-2013 02:31 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

     Can you change the first drop down in that condition to "the expression" and then copy and paste the resulting expression in a reply?

    Hilary Stoupa

  • 06-29-2013 05:39 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

    Thanks Hilary.

    I did as you had mentioned. And here is the expression - xdXDocument:GetDOM("Employee Tracker")/dfs:myFields/dfs:dataFields/dfs:Employee_Tracker/@AIM_ID != .

     Please let me know if additional information is required.

    Thanks in advance.

    Thanks

  • 06-30-2013 02:37 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

    Try this instead:

    xdXDocument:GetDOM("Employee Tracker")/dfs:myFields/dfs:dataFields/dfs:Employee_Tracker/@AIM_ID != current()

    Hilary Stoupa

  • 06-30-2013 02:57 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

    Thanks Hilary.

    I tried that now and it is still the same. It is showing red borders irrespective of whether the typed value matches or not.

    Thanks

  • 06-30-2013 06:54 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

     One more try -

    not(xdXDocument:GetDOM("Employee Tracker")/dfs:myFields/dfs:dataFields/dfs:Employee_Tracker[@AIM_ID = current()])

    Hilary Stoupa

  • 07-01-2013 02:58 PM In reply to

    Re: Need to throw an error message when the typed value does not match with SharePoint list

    AWESOME!!!!!

    Thanks. I tried now and it worked. Thanks a bunch Hilary!!!

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.