Infopath Repeating Table, preceding-sibling & multiple views - InfoPath Dev
in

InfoPath Dev

Infopath Repeating Table, preceding-sibling & multiple views

Last post 10-18-2011 12:22 AM by Jimmy. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-15-2011 04:02 AM

    Infopath Repeating Table, preceding-sibling & multiple views

    Hi,

    Hoping someone can help me, I have a Infopath (2010) form which is using a repeating table for PO requests.  I am using preceding sibling so that all items get posted against the same budget code as the 1st budget code entered on the table:

    ie. preceding-sibling::RequestDetailsRepeat[1]/ReqBudgetCode

    This works fine on the initial submit view, but on the other views ie. manager approval view etc description, total price etc in the repeating table display as they were submitted, but my budget code column displays no value ie blank.  I know this is being caused by using the preceding-sibling function but not sure how I can fix it, ie. get my preceding-sibling values displayed on all other views once the form has been submitted, any ideas how I can work around this ?

     This what I used to setup the above

     http://www.infopathdev.com/forums/p/15855/56197.aspx

    TIA

  • 10-17-2011 09:29 AM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    Could you show us a few screenshots of your views and the conditional formatting rules?  I'm having trouble grasping what you're describing.  Where are you using that preceding-sibling formula?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-17-2011 11:31 AM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    Hi Jimmy,

     Thanks for your response, I have attached some screenshots which should make it clearer

     Basically I have a repeating section where they can enter the 1st budget code, & then they can list multiple items against that budget code, after the 1st item the other budget code fields auto populates using the preceeding sibling function & have the control disabled so they cant type in another budget code ie so they are always the same as the 1st one.

     

    But as you will see in the screenshots, all the budget codes dissappear on the approval view which is the problem I have.

    https://skydrive.live.com/redir.aspx?cid=bfac7d98941c0b11&page=play&resid=BFAC7D98941C0B11!536

     

    TIA.

     

     

  • 10-17-2011 10:30 PM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    Ok, thanks for those screenshots.  That does look confusing.  Are the BudgetCode textboxes bound to the same field in both views?  If you switch back to the other view, are the BudgetCode textboxes still filled?  Is there filtering on the repeating tables?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-17-2011 11:00 PM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    Hi,

     

    Good point, the fields are both the same in each view however once the form has been submitted if I go back to the original view, ie the submit view the budget code fields are blank.

     Any idea what would cause the budget codes to dissappear after submission using the preeceding sibling function ?  As I say I implemented it as described here: http://www.infopathdev.com/forums/p/15855/56197.aspx

     

    I have added a copy of the form here if that helps.....

    https://skydrive.live.com/?cid=bfac7d98941c0b11#!/?cid=bfac7d98941c0b11&sc=documents&uc=1&id=BFAC7D98941C0B11%21157 

     

     

     

  • 10-17-2011 11:20 PM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    Yes, being able to see the form directly always helps, if you're willing to share it.

     I'm guessing this is an issue with the way the default values are working on the fields when the form reopens.  It looks like in the first row, ReqBudgetCodeHidden will always be blank, something causes that to be copied into the first ReqBudgetCode field, and that propagates to all the others.

    To sort of sidestep that issue, can I ask why you have a ReqBudgetCode field in every row of the repeating group if you want them to all have the same value?  Why not have it outside the repeating group?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-17-2011 11:34 PM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    You should be able to access the form from the skydrive link I posted if not let me know.

     I did think that but there will need to be various reporting standard & adhoc done against the data, all the form data gets written to an SQL DB, so by attaching the budget code to each line item it supports all reporting possibilities & keeps the DB nice & simple - I think! :0)  but I maybe thinking about this wrong ?!?

  • 10-17-2011 11:38 PM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    "I'm guessing this is an issue with the way the default values are working on the fields when the form reopens.  It looks like in the first row, ReqBudgetCodeHidden will always be blank, something causes that to be copied into the first ReqBudgetCode field, and that propagates to all the others."

     Thats sounds about right, I need to find this rule & make it only apply when the form opens for submission & not on any other views.

     

    Cheers,

  • 10-18-2011 12:22 AM In reply to

    Re: Infopath Repeating Table, preceding-sibling & multiple views

    >> You should be able to access the form from the skydrive link I posted if not let me know.

    Sorry I confused you.  I did get the file. I guess I should have said "any time you're willing to share it" instead of "if you're willing to share it."  Most people are reluctant to share their forms, and that's why I usually don't ask.

    >> I did think that but there will need to be various reporting standard & adhoc done against the data, all the form data gets written to an SQL DB, so by attaching the budget code to each line item it supports all reporting possibilities & keeps the DB nice & simple - I think! :0)  but I maybe thinking about this wrong ?!?

    Ok, that could be a valid issue. I don't know how your data gets written to the DB or how your reporting process works, but if you have a requirement to have that value in every row of the repeating group, you can still have a non-repeating ReqBudgetCode field outside the table, and just use a hidden field in the repeating group with a default value formula to copy the value in.  That should save you from all of these complications.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.