Validate entry is needed based on SP list fields - InfoPath Dev
in

InfoPath Dev

Validate entry is needed based on SP list fields

Last post 09-10-2013 02:35 PM by mpete1310. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-03-2013 04:57 PM

    Validate entry is needed based on SP list fields

     I have a form that is going to be used for production of assembled parts. I have several fields on my list that are text boxes and will be filled in with serial numbers when needed. In order to verify that a serial number is needed I made a secondary list (connected to a secondary form) that has fields marked with "yes" or blank. I am having trouble filtering to a single field, say column 3 row 2, to find the value "yes" or blank in that field. I tried using AND conditions to narrow it down but that doesn't seem to work. Any suggestions are appreciated and if more info is needed I will try to answer.

    Thanks

    Filed under:
  • 09-06-2013 01:58 PM In reply to

    Re: Validate entry is needed based on SP list fields

     So - I think what you probably need help with is a filter your XPath - is this a data validation rule? What are conditions you are currently using?

    Hilary Stoupa

  • 09-06-2013 02:41 PM In reply to

    Re: Validate entry is needed based on SP list fields

     Hi Hilary,

    Thanks for the reply. Yes! I need help filtering my XPath inside a data validation rule. I have tried multiple condition filters up to this point and none have worked the way I want. What I have tried the most is if PartNumber (secondary) = field1 (main) *field1 (main) is an auto-fill Part Number from secondary in the form* AND SNNeeded? (secondary) = "Yes"   then form reads a serial number is needed.

    On another note, I don't fully understand when to use data vs query when choosing fields for filtering. What is the difference?

  • 09-06-2013 02:53 PM In reply to

    Re: Validate entry is needed based on SP list fields

     Let's start with the second question. :)

    Query fields are fields you can set to indicate the data you want returned - it is like saying "I want all rows where customer name is Bob". You set query fields prior to executing a query.

    So - you would never use query when choosing fields for filtering. Only the data fields.

    I think the issue you are having is the two separate conditions. InfoPath is checking for the PartNumber = field1 and then in your second condition, just looking at the very first instance of SNNeeded.

    I would use the following:

    1st Condition: field1 is not blank and
    2nd Condition: field1 is equal to - then use a formula

    For the formula, select PartNumber in your secondary data source (2ds) - when you select it, you'll see a Filter button. Click that. For the filter, select SNNeeded (2ds) is equal to "yes".

    I *think* this will do it - but if it doesn't work post back and attach your form under the Options tab and I'll help you out.

    Hilary Stoupa

  • 09-06-2013 03:10 PM In reply to

    Re: Validate entry is needed based on SP list fields

     It works! thanks a lot!

  • 09-10-2013 11:43 AM In reply to

    Re: Validate entry is needed based on SP list fields

     Hi again Hilary,

    So I ran into a problem after fixing my problem with your solution. The InfoPath form work fine in preview mode (within InfoPath) but where I publish my form to SharePoint it does not load the same.

     I have two views that a button is set to switch between. The only way for the validation to show is when I switch views and then switch back, the validation does not show on initial loading of the form. Any input on why this wouldn't work is appreciated, thanks.

    Filed under:
  • 09-10-2013 02:06 PM In reply to

    Re: Validate entry is needed based on SP list fields

     Euw. I'm not sure why it is failing in the browser. It sounds like the form is having to post back (which it is doing when you switch views) before the validation is running. I wonder if you could use a helper field for this - a Boolean field that doesn't show on the form that is set to false and then set it to true on load, use it as part of your validation formula (and HelperField = true). You could set it back to false on submit. Kind of a hack, but all I can think of off-hand....

    Hilary Stoupa

  • 09-10-2013 02:35 PM In reply to

    Re: Validate entry is needed based on SP list fields

    I talked to an IT person at my work and he said SharePoint has funky ways of using logic sometimes, so it sounds like a SharePoint problem. Interesting idea....I will try that and let you know what happens. thanks.

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