Programatically Create Tables Dependent on Another Fields Value - InfoPath Dev
in

InfoPath Dev

Programatically Create Tables Dependent on Another Fields Value

Last post 08-27-2018 10:02 AM by cartotech81. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-23-2018 09:23 AM

    Programatically Create Tables Dependent on Another Fields Value

    Using InfoPath Designer 2013

    There are probably multiple ways to do this, but I would like to know your opinions and help on the best way.

     I have a repeating table called travelersRepeatingTable.

    I have a text box that counts the number of rows in travelersRepeatingTable called travelerCount

    I want to be able to create new tables dependent on the traveler count.

    For instance:

    I would open the form and add in 2 travelers information.

    That in return would create 2 different tables. If i had 2 travelers it would load 3 tables.

    Each of these tables would have the following:

    Row 1 - Traveler Name pulled from Row 1 of the travelersRepeatingTable

    Row 2 - 4 column header row with expense types labeled

    Row 3 - 4 column row with currency text fields with actual expenses.

     

     Would need a blank row between the tables for separation purposes.

     

  • 08-27-2018 09:24 AM In reply to

    Re: Programatically Create Tables Dependent on Another Fields Value

    So - you are able to add code to your form? If so, you could just use code to add the instances of your repeating node that you need, based on the number entered. If not, you could use default data for this - add the max number of rows you'll let the user add to the defaults, then display them based on the entered number. Let me know if you'd like a sample of that approach.
    Hilary Stoupa

  • 08-27-2018 10:02 AM In reply to

    Re: Programatically Create Tables Dependent on Another Fields Value

     I am not able to do VBA without installing VBA for InfoPath or some addin to allow me to do it, and its not authorized on our system.

     The problem is our amount of travelers can change so I don't really have a good max number.

    Can you code without the VBA addin? 

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