Issue after updating Form Template from IP 2007 to IP 2013 [SOLVED] - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Issue after updating Form Template from IP 2007 to IP 2013 [SOLVED]

Last post 09-02-2016 03:11 PM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-02-2016 09:23 AM

    Issue after updating Form Template from IP 2007 to IP 2013 [SOLVED]

    Hello Everyone,

    I have a form that I updated from InfoPath 2007 to 2013. After the update, a concat formula is no longer working. I have verified that there are no errors in the formula, it is simply no longer pulling in data the way it used to.

    In the form I have a field (FIELD_1) which references the ID number of another field which draws it's values from a secondary connection (FIELD_2).

    Here's the breakdown of the problem:

    FIELD_2 is a dropdown list control which is connected to a secondary SharePoint list used to provide values for the dropdown list

    FIELD_1 is a text field control which concatenates data from FIELD_2 and puts it in a format that can be submitted to a SharePoint list in order to update a Lookup field. The Lookup field references the same SharePoint list as FIELD_2.

    In the 2007 version of the form, the concat formula worked perfectly.

    For example, let's say the SharePoint list referenced as a secondary connection for FIELD_2 had two rows:

    ID Title
    1 Apples
    2 Oranges




    FIELD_2 would contain the Title values in the dropdown list (Apples, Oranges).

    Depending on which value was selected, FIELD_1 would grab the ID number associated with the Title value and put it in the following format
    ID;#Title

    So if a user selected Oranges from FIELD_2's dropdown list, FIELD_1 would look like this: 2;#Oranges

    The problem I am having in the 2013 version of the form template is that the ID value is no longer populating.

    Instead of getting 2;#Oranges, I am only getting ;#Oranges.



    The concat formula for FIELD_1 looks like this:

    concat(ID[Title = FIELD_2], ";#", FIELD_2)



    Again, this formula worked without any issues in the 2007 version of the InfoPath form template, but is not working in the 2013.

    Any help is greatly appreciated.
    --
    David Alvarado
  • 09-02-2016 11:15 AM In reply to

    Re: Issue after updating Form Template from IP 2007 to IP 2013

    I was able to get an ID number to populate in the formula, however it is the wrong ID number... a static ID number populates regardless of which value in the dropdown list I select.

    In this example, the value that was selected from the dropdown list control has ID=10 and Title=Budget Office.

    Here are the two formulas and their outputs:

    Formula 1: Outputs a value missing an ID number altogether. ;#Budget Office

    concat(xdXDocument:GetDOM("Departments")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID
    [xdXDocument:GetDOM("Departments")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title =
    /my:myFields/my:grpEmployee/my:ef_Department], ";#", /my:myFields/my:grpEmployee/my:ef_Department)



    Formula 2:Outputs a value with an incorrect ID number: 25;#Budget Office

    concat(xdXDocument:GetDOM("Departments")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID
    [xdXDocument:GetDOM("Departments")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title =
    xdXDocument:get-DOM()/my:myFields/my:grpEmployee/my:ef_Department], ";#", /my:myFields/my:grpEmployee/my:ef_Department)



    The only difference between the two formulas is highlighted in bold underline in Formula 2.



    The correct output should be: 10;#Budget Office



    Unfortunately, ID number 25 is populated with Formula 2 regardless of which value is selected...

    Again, any help is greatly appreciated!
    --
    David Alvarado
  • 09-02-2016 11:57 AM In reply to

    Re: Issue after updating Form Template from IP 2007 to IP 2013

    Figured it out, sort of.

    This XPath fixed the issue for me:
    concat(xdXDocument:GetDOM("Departments")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID
    [../d:Title =
    xdXDocument:get-DOM()/my:myFields/my:grpEmployee/my:ef_Department], ";#", /my:myFields/my:grpEmployee/my:ef_Department)

    The code highlighted in bold underline is the only difference between this XPath formula that successfully populates the correct value ID and the XPath code from Formula 2 above.

    To me, it seems to be the same formula but apparently not.

    Anyways, looks like all's well here. Thanks.
    --
    David Alvarado
  • 09-02-2016 03:11 PM In reply to

    Re: Issue after updating Form Template from IP 2007 to IP 2013

    Sorry you ended up sort of talking to yourself on this one - but I'm glad you got it figured out & thanks for posting :)
    Hilary Stoupa

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