Can't get xml to work. - InfoPath Dev
in

InfoPath Dev

Can't get xml to work.

Last post 05-20-2010 09:56 AM by Catharine. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-20-2010 04:52 AM

    Can't get xml to work.

    I have the following data source

    SKUIntroductionGroup
       RegionalGroup (repeating field) (multi selection box on form)
    FormCalculationsGroup
       FirstNonBlankRegionalGroup

    in the FirstNonBlankRegionalGroup I want to have the first value of RegionalGroup which is not blank.

    I have put the default value of /my:myFields/my:SKUIntroductionGroup/my:RegionalGroup[. != ""] and it never displays any value.

    I have created an expression box control and put the same /my:myFields/my:SKUIntroductionGroup/my:RegionalGroup[. != ""] in it and it works fine.  I think I am going nuts.  What have I done wrong?

    Catharine

  • 05-20-2010 05:57 AM In reply to

     The funky thing about multi-selection list boxes is that default values that reference them only get updated when an item is deselected.  In addition to leaving the default value as that formula you have, please try using a rule to set the value of FirstNonBlankRegionalGroup to the value of that formula.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 05-20-2010 09:56 AM In reply to

    Thank you Jimmy.  - Why does the expression box work ? 

     I have moved on one step now....

    I have a secondary data source (GetWhosWho) which has Fields; Region,Role;Email

    I have a field whose default value is xdXDocument:GetDOM("GetWhosWho")/dfs:myFields/dfs:dataFields/ns3:GetListItemsStrResponse/ns3:GetListItemsStrResult/Rows/row/Email[../Role = "Regional EVP" and ../Region = xdXDocument:get-DOM()/my:myFields/my:FormCalculationsGroup/my:TopNonBlankRegionalGroup]

    My field TopNonBlankRegionalGroup displays a value (Thanks to Jimmy above) 

    Eg China  I have a row in my secondary data source which corresponds to China and Regional EVP - but no value is displayed in my field.

    I thought it was because the "China" in my secondary data source was different to the "China" in my field BUT

    I have an expression box whose value is xdXDocument:GetDOM("GetWhosWho")/dfs:myFields/dfs:dataFields/ns3:GetListItemsStrResponse/ns3:GetListItemsStrResult/Rows/row/Email[../Role = "Regional EVP" and ../Region = xdXDocument:get-DOM()/my:myFields/my:FormCalculationsGroup/my:TopNonBlankRegionalGroup]

    ie identical and the correct value appears in the expression box.

    This is truly driving me nuts.  My pc will be heading out the window shortly.

    Catharine

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