Query data for multiple vaules - InfoPath Dev
in

InfoPath Dev

Query data for multiple vaules

Last post 12-29-2012 10:50 PM by Mel Clemente. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-05-2012 05:10 AM

    • hanne
    • Not Ranked
    • Joined on 11-05-2012
    • Posts 1

    Query data for multiple vaules

    Hi all, realy hoping you can help me with this one :)

    I have a Form with a field from where you can choose different regions. The field is a "Multiple Selection list box" and is based on data from a SharePoint list. The list has several columns: TitleA, TitleB, ID. In the field I have set Display name to "TitleA" and value to ID. This is because I need the ID as a parameter to be sent to a PerformancePoint web part in SharePoint.

    The issue for me is that I want some sort of calculated field that tell the user, what fields they have chosen. Since the ID's won't make much sense I need to query the "TitleB" and show the users. So my setup is as follows:

    FORM FIELDS:

    Choose Region:

    Multiple Selection list box -> Display "TITLEA". Actual value "ID"

    Hidden field to be sent to PerformancePoint

    Text Box -> Displays chosen values from Region as comma separated string: "ID_1, ID_2, ID_3"

    based on formula: substring(eval(eval(Region[. != ""]; 'concat(", ", .)'); ".."); 2)

    You have chosen

    Needs to display the same as the hidden field, only it should contain titleB as in "TitleB_1, TitleB_2, TitleB_3"

    Is this possible, with or without coding? No matter what I try I either end up with the ID's or only the first value when converting to TitleB

    This is for a browser enabled form in 2010, so performance is important.

    /Hanne

  • 12-29-2012 10:50 PM In reply to

    You won't need two title fields. I attached a sample form with the formula you need: substring(eval(eval(title[id = Region], 'concat("; ", .)'), ".."), 2)

    Mel Clemente
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

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