Using "Current" In repeating Tables? - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Using "Current" In repeating Tables?

Last post 10-17-2019 07:33 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-15-2019 08:16 AM

    Using "Current" In repeating Tables?

    Hi, sorry about asking but seems I'm having a few issues with repeating table data and new rows.

    Row 1 - I have a dropdown list box in column 1 of the table. (Populates from 2nd data connection from a SharePoint list library and people picker pulling out the Display Name) - after update or on change, I then run a rule that take the Display Name and updates a txtbox with the same people picker info but now adds the accountID so I can remove some of the company data from the email address.

    Eg, Lets say Display Name looks like this: wirelad(WARR) and the accountID looks like this: gmail\wirelad - The txtbox now contains wirelad - This is what Im after. Perfect!

    substring-after(AccountId[DisplayName = cmbg1stApprovalEmail], "\") 

    All this might not even be relevant?

    The problem I have if someone clicks new row - the txtbox remains and keeps the words "wirelad" in and my opinion, should be blank. Also, If I select a new person different from the one in the first row, again using the dropdown listbox. The listtext box is updated with the first persons name.

    Looking back at some blogs - seems the use of "Current" sorts out repeating table rows?? I also have the same issue with a repeating section.

    How do you use current? 

    Please, Hope you can help - ?



    PS this is what the  XPath looks like: Where and how do you insert "current"?

    substring-after(xdXDocument:GetDOM("Email Supply List")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:People_x0020_Picker/pc:Person/pc:AccountId[../pc:DisplayName = xdXDocument:get-DOM()/my:myFields/my:gScopeWork_a/my:gScopeAttachments/my:gAttachments_a/my:cmbg1stApprovalEmail], "\") 




  • 10-15-2019 02:18 PM In reply to

    Re: Using "Current" In repeating Tables?

    No need to apologize. Any chance I can see your form?
    Hilary Stoupa

  • 10-16-2019 02:07 AM In reply to

    Re: Using "Current" In repeating Tables?

     Thanks Hilary,

     Form should be attached? - I tried to strip out some stuff you perhaps don't need to see but that just made things worse. Not sure how or if you can duplicate the error without connecting to our server etc. (You'll know more about that then me)

     If you look at the selection "Scope Approver" ( You might need to un-check some hide rules) For now I've added the field which normally would be hidden below the dropdown box.


     Heres what's happening - first time round, select person from dropdown box - bottom box then gets updated with the accountID of that same person. If after a second row is needed - as you can see, select a new person and the bottom box picks you the first persons accountID

    I also have the same problem in the RAMs section below on the form.

    Any help be most appreciated.

    Thanks Hilary,





  • 10-16-2019 12:09 PM In reply to

    I can't connect to your server, but I just think better when I can see the schema and it keeps me from having to ask 6,000 questions. :) Try using a rule on cmbg1stApprovalEmail instead of a default value. Save the attached file locally, right click and select Design - then you can preview and give it a test. I removed your default and set a rule instead (and when I added the filter, InfoPath changed the full path to current() for me)
    Hilary Stoupa

  • 10-17-2019 03:49 AM In reply to

    Re: Using "Current" In repeating Tables?

     Unbelievable Hilary - Don't know what I'd do without you? This has worked... can't thank you enough.

    Not sure I'll ever understand why my way  "get data"  didn't work and rule action Set field data worked? End of the day... its all data in a given row.

    What have I learned from this...(apart from knowing, your a rock star Hilary;-)

    I should use rules to set data rather than trying to get data?

    I don't know...


    Again Hilary, Thank you so much,

    Have a great day.



  • 10-17-2019 07:33 AM In reply to

    Re: Using "Current" In repeating Tables?

    I don't care for default values in general - I'm sort of a control freak that way. I'd much rather use rules. I think it could have been done w/ default values, but the XPath becomes more complicated, and with a rule, InfoPath was able to help us - it knew the "right" thing to do. :)
    Hilary Stoupa

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