Complex double eval... - InfoPath Dev
in

InfoPath Dev

Complex double eval...

Last post 02-06-2012 08:52 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-06-2012 07:45 AM

    Complex double eval...

    Hi, I am using InfoPath 2007.

    I have a secondary data source.

    myFields
      dataFields (group)
        Who_To_Copy (repeating group)
          Business
          Region
          Email
          Admin.

    In my main data source I have

    myFields
      SKUIntroductionGroup - group
        Business
        Region (repeating field)

    I want to concatenate the email field from Who_To_Copy where the Business matches the Business in the main data source, and the Admin is set to true, AND the region matches any of the non blank regions set in the main data source.  It is the last criteria that I am having problems with... so far I have the following. which works

    xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("Who To Copy")/dfs:myFields/dfs:dataFields/dfs:Who_To_Copy[@Business = xdXDocument:get-DOM()/my:myFields/my:SKUIntroductionGroup/my:Business and @Admin = "1"], 'concat(@Email, "; ")'), "..")

    I have tried adding the following to the filter - but that does not work.

    and count(xdXDocument:get-DOM()/my:myFields/my:SKUIntroductionGroup/my:Region[. = xdXDocument:GetDOM("Who To Copy")/dfs:myFields/dfs:dataFields/dfs:Who_To_Copy/@Region]) > 0

    I have tried adding and that doesn't work. 

    and count(xdXDocument:get-DOM()/my:myFields/my:SKUIntroductionGroup/my:Region[. = current()/@Region]) > 0

    Is this a step to far ?  Is there a way to achieve this ?

    Thank you

    Catharine

     

    Filed under:
  • 02-06-2012 08:52 AM In reply to

    I think you can just do the same thing here as you did with the Business field:

    xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("Who To Copy")/dfs:myFields/dfs:dataFields/dfs:Who_To_Copy[@Business = xdXDocument:get-DOM()/my:myFields/my:SKUIntroductionGroup/my:Business and @Admin = "1" and @Region = xdXDocument:get-DOM()/my:myFields/my:SKUIntroductionGroup/my:Region[. != '']], 'concat(@Email, "; ")'), "..")

     Have you tried that yet?

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