Validate entry in Combobox in repeating table - InfoPath Dev
in

InfoPath Dev

Validate entry in Combobox in repeating table

Last post 01-12-2015 09:08 AM by DavidLeung. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 12-23-2014 07:38 PM

    Validate entry in Combobox in repeating table

    I have a GL account sharepoint list in a combobox/repeating table. The GL accounts in combobox are retrieved based on Users location. If a GL account is not in combobox, user can manually key in GL account. I need to validate this manually entered GL account. I have a secondary data source of the full GL account list. I am trying to filter the full GL account list with the manually entered GL account, then compare to see if the GL account is valid. I got it to work when a static value was used for filtering but it just wont work if I specifiy the entered value for filtering. Any suggestions how to get this to work? THANKS MUCH.
  • 01-02-2015 08:02 AM In reply to

    Re: Validate entry in Combobox in repeating table

    What does the validation rule look like? Change the first drop down to "the expression" to get the XPath.

    Hilary Stoupa

  • 01-02-2015 10:46 AM In reply to

    Re: Validate entry in Combobox in repeating table

     Hi Hilary,

    Here is validation rule:

    current()/../my:VxGL != xdxDocument:GetDOM("VISA GL# Validation")/dfs:myFields/dfs:datafields/d:SharePointListItem_RW/d:GL_x0023_[.=current()/../my:VxGL]

     

    "VxGL" is value entered in combo box.

    "VISA GL# Validation"  is secondary data source - I am trying to filter this using the VxGL.

    Thanks and much appreciated.

     

     

     

  • 01-02-2015 10:59 AM In reply to

    Re: Validate entry in Combobox in repeating table

    Hmmm - I wonder if instead you want:

    not(xdxDocument:GetDOM("VISA GL# Validation")/dfs:myFields/dfs:datafields/d:SharePointListItem_RW[d:GL_x0023_=current()/../my:VxGL])

    So, the validation rule fires if there is no row where the GL_x0023_ field matches the VxGL field - but what field is this rule currently on? Not VxGL?

    Hilary Stoupa

  • 01-02-2015 01:15 PM In reply to

    Re: Validate entry in Combobox in repeating table

    Rule is on VxGL. 

    Yes, I think I need "NOT" instead.

    That was why initially I used "not equal"  but I guess no rows found is not considered as not equal.

    Is there a way to go around this?

    THANKS Again. 

     

  • 01-02-2015 02:15 PM In reply to

    Re: Validate entry in Combobox in repeating table

    If the rule is on VxGL, I'd think this:

    not(xdxDocument:GetDOM("VISA GL# Validation")/dfs:myFields/dfs:datafields/d:SharePointListItem_RW[d:GL_x0023_=current()])

    Since current() refers to the node you are on - which is VxGL.

    Hilary Stoupa

  • 01-05-2015 08:41 AM In reply to

    Re: Validate entry in Combobox in repeating table

    Hi Hilary,

    I tried to publish form with the rule on VxGL and received the following error (Screen shots below).

    I changed "NOT"  to "current() !="  and no error message but that's not what we want.  Any suggestions?

    THANKS. 

     

     

     

  • 01-12-2015 09:08 AM In reply to

    Re: Validate entry in Combobox in repeating table

    Thank You.  It is working now that I created a new form.

    Not sure what went wrong with the old one. 

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