Can calculated value return multiple names? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Can calculated value return multiple names?

Last post 02-28-2013 02:35 PM by PMOdave. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-27-2013 01:40 PM

    Can calculated value return multiple names?

    Hi guys,

    I am very new to visio and have taught myself the basics through some trial and error.

    Essentially I have a form developped which i have published to a sharepoint site. I ask that users fill it out there and it gets saved to the library automatically.

    What I have done to enable printing is to create an alternate view, and this is where my problem begins.

    On the form view, I have a person picker control, with multiple selections enabled (seen here https://www.dropbox.com/s/i9etjf30yfgh7yh/close006.png)

    To make the print view cleaner I have removed the control and replaced it with a calculated value (seen here https://www.dropbox.com/s/87iq7zdn7lz402d/close007.png)

    The value used for the calculated value is DisplayName (seen here https://www.dropbox.com/s/e9ni0fiknywepsn/close008.png)

    It works very well and is much more attractive to print. HOWEVER, if multiple people are selected in the form control, one the first person's name is revealed in the calculated value field.

    How cna i fix this?

  • 02-27-2013 05:11 PM In reply to

    Re: Can calculated value return multiple names?

    You can use a more complex formula that has a double eval formula (here's a blog post about that). In the post, they are using the email address, but you can modify for display name.

    I'm also wondering if you just put a simple repeating table bound to the pc:Person node that has the display name in a calculated value - I'm attaching a sample - it is for IP 2010, what version are you using? Right click the link in the post heading, save the file locally. From there, right click the saved file and select "design" to open in design mode.

    Hilary Stoupa

  • 02-28-2013 07:46 AM In reply to

    Re: Can calculated value return multiple names?

    Thank you Hilary!!

    So the first option, in the blog post, did not work for me. I'm sure it's my fault. I tried doing this: eval(eval(person, "concat(my:email, ';')"), ".."). I then tried eval(eval(person, "concat(my:DisplayName, ';')"), "..") and eval(eval(person, "concat(DisplayName, ';')"), "..") as I'm unfamiliar with this syntax. InfoPath did not like any of these.

    Your sample works great! However, I can't seem to replicate it in my form and I can't figure out why!! It must be a setting I am not checking off somewhere, as it only displays the first name.

     Oh, I am using IP 2010 as well!

  • 02-28-2013 07:50 AM In reply to

    Re: Can calculated value return multiple names?

    OK!

    I figured out the problem and got the repeating table to work.

    Down to aesthetic questions. Is it possible to add the second/third entries as a new row rather than a new column below?

     thanks so much :) :)

  • 02-28-2013 07:54 AM In reply to

    Re: Can calculated value return multiple names?

    I'm not quite sure what you are saying? Can you post a screenshot of what's happening in your form? Design & preview?
    Hilary Stoupa

  • 02-28-2013 08:16 AM In reply to

    Re: Can calculated value return multiple names?

    Sure!

    Shot1- Design view https://www.dropbox.com/s/1khfm3ihdbwbszt/shot1.png 

    Shot2-Preview https://www.dropbox.com/s/ex54aleh4l9d6pu/shot2.png

    Working well as I can see multiple results. However, I am wondering if rather than appearing as

    Administrator

    Administrator

    It could appear as:

    Administrator     Administrator

  • 02-28-2013 08:42 AM In reply to

    Re: Can calculated value return multiple names?

    Is this a browser or a filler form? If filler, you can repeat horizontally. If browser, I can't think of a way to do this and you may be stuck w/ the double eval formula approach.
    Hilary Stoupa

  • 02-28-2013 02:35 PM In reply to

    Re: Can calculated value return multiple names?

    It's a filler form! I see what you mean now by the horizontal option.

    I'm playing with it now, It appears to be working, but I'll get back to you! :)

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