Concat and Eval not quite working correctly - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Concat and Eval not quite working correctly

Last post 08-03-2010 07:12 AM by JoanneWellings. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-03-2010 03:53 AM

    Concat and Eval not quite working correctly

    Hi All -

    Has anyone else had this problem?

     

    I'm populating a feld with a concatenation of data from a repreating section.

    The field has the default value of:

    eval(eval(group2, 'concat(/my:myFields/my:group1/my:group2/my:Prompt_Other, ", ")'), "..")

    My Data Source structure is:

    group1

        group2

            Prompt_Other

    It seems to work, except the first value in the repeating section is just printed over and over.

    So where the repeating section says

    Stress

    Location

    Job Itself

    The field says "Stress, Stress, Stress"

     

    I've tinkered with it but nothing seems to work. Does anyone have any ideas?

     TIA

    Filed under: ,
  • 08-03-2010 05:25 AM In reply to

    Re: Concat and Eval not quite working correctly

    You need to use a relative XPath:

    eval(eval(group2, 'concat(my:Prompt_Other, ", ")'), "..")

    Hilary Stoupa

  • 08-03-2010 05:33 AM In reply to

    Re: Concat and Eval not quite working correctly

    Thanks for the reply.

     

    The problem is if I do it that way, I get:

    msxml5.dll
    Reference to undeclared namespace prefix: 'my'.

    I can't find a solution for that, the only way I got it to work was with the full path. Some posts said that this required a support call to Microsoft!

  • 08-03-2010 07:06 AM In reply to

    Re: Concat and Eval not quite working correctly

    Your "group2" field in your formula -- You've selected that using the "Insert Field or Group" button, right? So that it is underlined?

    Hilary Stoupa

  • 08-03-2010 07:12 AM In reply to

    Re: Concat and Eval not quite working correctly

    Ah! That's done it. I originally pasted it in, so it was underlined but I hadn't actually chosen it from the field picker. That's sorted it, thank you!

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