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 5 of 6 (87 items) « First ... < Previous 2 3 4 5 6 Next >
Sort Posts: Previous Next
  • 03-10-2015 07:46 AM In reply to

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

    Here's my .xml file.

    If you will show me, the template IP form is the one posted Friday evening.

    Thank you! 

  • 03-10-2015 08:17 AM In reply to

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

    Okay, I'll try to take a look later today, but it may be tomorrow before I have a chance. :)

    Hilary Stoupa

  • 03-10-2015 08:29 AM In reply to

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

    Understood, thank you!
  • 03-10-2015 03:20 PM In reply to

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

    So - here is what I'm struggling to understand still. What data from the secondary XML you want where in the main data source. I think what you want can be done with default values but I just don't understand the relationship between the main data source and the secondary XML data source. Can you tell me what goes where?


    Hilary Stoupa

  • 03-10-2015 09:30 PM In reply to

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

    Okay, hopefully this helps. I've created a template of the attached repeating tables but it is formatted and looks much better in my form. I've inserted this template 4 times into my repeating table, once for each paragraph: Situation, Execution, Sustainment, Command and Control. The only paragraph that has nested default values is Execution. For the .xml files for this section I am only trying to set the default values for the Execution paragraph. Execution is paragraph 3. First I need to set default values for a. - k., that part is done with xPath, Subpara[count(current()/preceding-sibling::my:group3)+1/Code and Subpara[count(current()/preceding-sibling::my:group3)+1/Name. Second, I need to set the default value for subparagraphs 3.j. and 3.k.... 3.j. has two default values, (1) Tasks to Staff and (2) Tasks to Subordinate Units and 3.k. has 9 or 10 default values. I don't know how to execute the xPath for this but you showed me how to use rules but it would require a unique set of rules 12 times. Third, I need to set the default value for 3.j.(1) and 3.j.(2), about 19 values for 3.j.(1) and 10 for 3.j.(2) I was hoping this would be similar solution as above but with a secondary data source since there are 29 default values. Thank you!
  • 03-11-2015 02:57 PM In reply to

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

    The info in the form helped. See attached.

    Hilary Stoupa

  • 03-11-2015 07:57 PM In reply to

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

    That is exactly what I was looking for thank you, thank you. It looks a little complicated, I found the filter but I'm not certain how you did it. What are the ../.../..../..../ and what does it mean? I will give it a go tomorrow. Thanks again.
  • 03-12-2015 07:01 AM In reply to

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

    Okay, I found the id field and created it but I'm having trouble with the filter,  I've entered current()/../my:id but I'm guessing I need to select something to get    /../my:  ?


  • 03-12-2015 07:20 AM In reply to

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

    I think I got it, I had created only one id field now I am trying to create the other two, but IP won't let me name a field twice with the same name, how did you do that?

    Thank you!

  • 03-12-2015 07:33 AM In reply to

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

    Right click the id field in the data source task pane. Select "Reference". In the dialog that opens, select the group where you want the other instance.

     

    Hilary Stoupa

  • 03-12-2015 08:27 AM In reply to

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

    Sorry to be a pest, I got the ids created but I'm having trouble reverse engineering how you created the expression.  I've typed in what you have but I'm getting the error ../my:id does not point to a valid location path of a field or group.  Here's a screen shot of the expressions with the three id fields under respective group under Execution.
  • 03-12-2015 12:43 PM In reply to

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

    Select the correct Code node in the first drop down, then in the third drop down use the formula editor - type in the formula. ../ is relative XPath - each ../ takes you up one level. I can't see from your screenshot what field this formula is for, so can't guess the correct XPath.

    Hilary Stoupa

  • 03-12-2015 01:12 PM In reply to

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

    I have both paragraph j.(1) and k.(1) working on the first insert but when I click to insert j.(2) and k.(2), I get the following.  It inserts after I click ok on the pop up.  Here's what my xPath looks like:

    j.(1) xdXDocument:GetDOM("AMC_OrdersFormv1")/Order/Execution/Subpara/Option/Name[../Code = current()/my:id and ../../Code = current()/../../../my:id]

    k.(1) xdXDocument:GetDOM("AMC_OrdersFormv1")/Order/Execution/Subpara/Option/Step/Name[../Code = current()/my:id and ../../Code = current()/../../../my:id and ../../../Code = current()/../../../../../../my:id]


  • 03-12-2015 01:23 PM In reply to

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

    I had used expression boxes, I'm going to change them to fields and see if that makes a difference.
  • 03-12-2015 02:46 PM In reply to

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

    For the first xPath, I'm trying to force the xPath to take /../my:id but it will only let me put /
Page 5 of 6 (87 items) « First ... < Previous 2 3 4 5 6 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.