Displaying controls based on the values of columns in a repeating table - InfoPath Dev
in

InfoPath Dev

Displaying controls based on the values of columns in a repeating table

Last post 03-09-2009 12:10 PM by lcaillouet. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-06-2009 03:56 PM

    Displaying controls based on the values of columns in a repeating table

    I am not sure if this can be done are not. But here is what I want to do.

    I have a repeating table with a column that is a customer type that is populated from another sharepoint list.

    Based on the type of customer I want to display/hide some additional form controls.

    Some customers can have more then one customer type.

    I tried creating a list box control and populated it for the values of the customer type for the selected customer and it shows all the customer types and the first line is blank.

    So then I set a condition not to display another control if this list box contained one of listed customer types.

    Since the first line is blank it thinks there is no customer type so nothing gets displayed.

    Does anyone know how I can do this?. I am thinking I need to populate a text box and concantonate all of the current values so I can check to see if that control contains a particular customer type.

  • 03-07-2009 12:04 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Displaying controls based on the values of columns in a repeating table

    Hello Welcome to the Forums,

    You have to change your conditional formatting adding with that dropdown value ‘is not blank' condition.

  • 03-09-2009 07:11 AM In reply to

    Re: Displaying controls based on the values of columns in a repeating table

    Thanks but that does not solve my issue. I want to be able to display a control based on the values in the list. If one of the values is equal to apples I want to show a specific control if it is equal to organges I want to show another control and I want to be able to show the controls for both apples and organges if that is what is in the list. My list can vary from record to record. I hope that makes sense. I want to know if the list contains a specific value. I have tried using the the contains condition but the problem is that it only see the list control as being equal to the first record. I want to be able to compare it to everything in the list.

  • 03-09-2009 07:40 AM In reply to

    Re: Displaying controls based on the values of columns in a repeating table

    lcaillouet:
    So then I set a condition not to display another control if this list box contained one of listed customer types.

    Since the first line is blank it thinks there is no customer type so nothing gets displayed.

    The above doesn't make a lot of sense to me.  If you set it to not display a control when the specified value is there, wouldn't the control's absence mean that it is correctly finding the value?

     

    Please try setting the conditional formatting on the relevant control(s) to hide the control when the following expression is true:

    not(my:group1/my:group2/my:field3 = 'apple')

    replacing the underlined part with the path to the relevant field.  This should cause the control to be hidden when none of the rows in the repeating table has the value apple, and to be shown when at least one has that value.  I don't believe you should need a list control to accomplish this.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-09-2009 12:10 PM In reply to

    Re: Displaying controls based on the values of columns in a repeating table

    Yes your are right I stated that backwards. I added a list control called CustomerTypeList and then I filtered it so that the list would contain only the types for the selected customer (which is another drop down box). That works fine. I don't know how to enter the expression your gave me into Infopath. Can you give me some direction or point me to something that explains this? From reading this I interpretted that it should be    not(my:group1/my:group2/my:CustomerTypeList= 'Major_Account').  I tried copying this in the Insert Formula window and that did not work (I have no idea how to do this)

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