Problem populating a text box in a repeating table - InfoPath Dev
in

InfoPath Dev

Problem populating a text box in a repeating table

Last post 08-03-2009 11:15 AM by justin_a. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-31-2009 09:15 AM

    Problem populating a text box in a repeating table

    I am fairly new to infopath and am running into a minor problem.

    I work in HR and built a form that connects to a couple of sharepoint lists.  The form includes a repeating table.  In the repeating table, the user enters a job code in the first text box.  I want the form to populate other fields in the row (job title, pay range, etc).  I figured out how to use the current() function and do a relative reference and got the fields to populate as an expression.

    Problem is that I want to use the pay rate in some other formulas, so I need it to populate it into a text box.  If I use the same xpath formula from the expression in the default field of the text box, nothing happens.  It doesn't flag an error, just returns a blank cell.  I also tried to set the text box using a rule on the job code box - same result, didn't work.

    If I re-create the situation outside of a repeating table or repeating section, it works perfectly (using either the default value or rule method).  Any thoughts?  I am totally perplexed.

    Thanks, Justin

    Filed under:
  • 08-03-2009 09:33 AM In reply to

    Re: Problem populating a text box in a repeating table

    Hi, Justin:

    Was the expression box you were using also located in the repeating section? What does the formula that is working in the expression box look like?

    Hilary Stoupa

  • 08-03-2009 09:43 AM In reply to

    Re: Problem populating a text box in a repeating table

    The expression box was also in the repeating section.  (I also tried a repeating table with the same results.)

    The xPath formula I'm using in the expression looks like this (works as intended):

    xdXDocument:GetDOM("Company Jobs")/dfs:myFields/dfs:dataFields/dfs:Company_Jobs/@PayRate[../@JobCode = current()/my:JobCode]

     

     

  • 08-03-2009 10:16 AM In reply to

    Re: Problem populating a text box in a repeating table

    The expression box is considered to be at the same level as the repeating node, I think, and the text box is bound to a field in the repeating group, so a slightly different xpath is needed:

    xdXDocument:GetDOM("Company Jobs")/dfs:myFields/dfs:dataFields/dfs:Company_Jobs/@PayRate[../@JobCode = current()/../my:JobCode]

    We have to move from the field we are at up to the repeating node, then back down to get the JobCode.

    Hilary Stoupa

  • 08-03-2009 11:15 AM In reply to

    Re: Problem populating a text box in a repeating table

    Still no luck - same results.

    I also tried the same xpath you suggested (and a few slight variations) attached to a rule on JobCode that set the value of the PayRate field with no luck.

    Any other ideas?

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