Populate a text field using a multi-value lookup column in "ID;#Title" format - InfoPath Dev
in

InfoPath Dev

Populate a text field using a multi-value lookup column in "ID;#Title" format

Last post 05-10-2012 10:47 AM by BryanJones. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-09-2012 11:43 AM

    Populate a text field using a multi-value lookup column in "ID;#Title" format

    I already (with help from folks here) am able to get this: 1;#title;2;#title;3;#title;

    using this: substring(xdMath:Eval(xdMath:Eval(../my:MyLookup, 'concat(., ";#", "title", ";")'), ".."), 9)

    but I need to replace "title" with the actual Title associated with the ID that the lookup passes (with Value set to ID).

    I tired using translate() to replace "title" with a filtered version of the same data source, but that doesnt work either, just populates it with the first letter of the last one I selected.

    Any help would be appreciated!

    Filed under:
  • 05-10-2012 10:47 AM In reply to

    Re: Populate a text field using a multi-value lookup column in "ID;#Title" format

    I got this to work in preview-mode with this:

    substring(xdMath:Eval(xdMath:Eval(../my:ChgNtcSvcsAffected, 'concat(., ";#", string(xdXDocument:GetDOM("IT Services")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[current() = ../d:ID]), ";")'), ".."), 4)

    but it doesnt work when publshed out in sharepoint. If 1 item is selected, I get something like "alue1;1;#Value;" If more are selected, it seems to set all the values to the last one selected along with doubling the title somehow. Anyone have any ideas?

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