Trouble autopopulating read only textbox on incrementing expression box value in repeating table - InfoPath Dev
in

InfoPath Dev

Trouble autopopulating read only textbox on incrementing expression box value in repeating table

Last post 03-12-2015 04:04 PM by jack eagly. 86 replies.
Page 1 of 6 (87 items) 1 2 3 4 5 Next > ... Last »
Sort Posts: Previous Next
  • 02-12-2015 12:01 PM

    Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    I have multiple nested repeating sections.  Within each section I have an expression box that counts each time a new item is inserted. I want the text box in field 1 to be read only and auto populate based on the expression box value.  If expression box value is "a." then "Paragraph 1", if "b." then "Paragraph 2", if "c." then "Paragraph 3" and so on.  I created an .xml file to host the text to go into field 1.

     

    Would I be better creating multiple .xml files for each instance of my nested repeating sections or should I try to create one master .xml file and reference that one .xml file to each field I want to receive data from .xml?

     

    If a. then Paragraph 1

          if 1. then Text under para 1

    If b. then Paragraph 2

          if 1. Then Text under para 2

    If c. then Paragraph 3

          If 1. Then Text under para 3

     

    I was trying to create an expression something like Count(my:group2, Name = count)

    my:group2 is the repeating section, Name is Paragraph 1.

     

    Thanks! 

  • 02-12-2015 01:24 PM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    hmm. it would be nice to be able to set up a rule if the expression box was a value field 1 would be set to specified value.
  • 02-12-2015 02:27 PM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    You could change that to a field w/ a default value and then have a rule that runs when the field changes. Attach a sample if you'd like a hand tho. :)

    Hilary Stoupa

  • 02-13-2015 07:34 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    Thank you, I want the field to be tied to the expression box we created the other day so that when the expression box is 1 field1 is Paragraph 1 and when the expression box for the repeating section is 2 on insert item then the new row is added and the expression box for that row is 2 field1 is Paragraph 2. I set the field to Paragraph 1 and then start a Rule but I don't know how to tie it back to the expression box since it isn't an identifiable field, or is it and I don't see it?
  • 02-17-2015 11:58 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    Please provide a sample, thanks.  Can it be tied to the expression box so that when the value of the expression box changes the value changes with the rules?

  • 02-17-2015 12:01 PM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    I must have been unclear - can you attach a sample form with what you are currently trying? Then I have something I can work from. :)

    Hilary Stoupa

  • 02-17-2015 02:16 PM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    Sorry,

    Here's a sample form with what I want to auto fill the first textbox in field1 with based on the expression values.

    a. Area of Interest.

    b. Area of Operations.

    c. Enemy Forces.

    d. Friendly Forces.

    e. Interagency, Intergovernmental, and Nongovernmental Organizations.

    f. Civil Considerations.

    g. Attachments and Detachments.

    h. Assumptions.

  • 02-17-2015 02:33 PM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    So - is this going to be static text? any time the letter is "a." it would be Area of Interest?

    Hilary Stoupa

  • 02-17-2015 06:16 PM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    For this section of the form, yes. There are other sections where a. will have a different value. If it makes sense, I am creating a custom control for my repeating sections so I can insert it multiple times and then apply the different rules to each section.
  • 02-18-2015 07:53 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    Usually, I'd recommend a secondary data source for something like this - but here is a copy of your form back, I set a default value on the serial number field that is effectively the same as the calc'd value, and then added a single rule to set field 1 if the value contained "a" - hopefully that will get you started. :)

    Hilary Stoupa

  • 02-18-2015 09:54 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    Thank you, should I expand on the set field 1 value using and/or or add a new Rule 1 where serialNumber = "b" set field 1s value to Area of Operations?  I've created a new Rule and it is working, just wondering if I should create 12 Rules or use the one set Field 1 (serialNumber contains "a" that you started.

    I had created an XML file previously but wasn't sure how to link it to Field 1, your initial recomendation.  Is the coding similiar for pulling from secondary data source to setting up the Rule?  I've attached my xml file.  Is the only advantage that it would be easier to update the xml file versus adding a new rule?


     

  • 02-18-2015 10:15 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    I just don't like having a dozen rules - that is why I would take the secondary XML approach. See attached. :)

    Hilary Stoupa

  • 02-18-2015 11:03 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    You are awsome. Thank you...
  • 02-18-2015 11:10 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    How would I tell infopath not to insert a new section past row h?

  • 02-18-2015 11:14 AM In reply to

    Re: Trouble autopopulating read only textbox on incrementing expression box value in repeating table

    oh, that gets tricksy. You can add conditional formatting to not allow it - see attached. The issue with this approach is once they hit the limit, they also can no longer remove things.

    Hilary Stoupa

Page 1 of 6 (87 items) 1 2 3 4 5 Next > ... Last »
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.