Writing from a list box to a text field - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Writing from a list box to a text field

Last post 01-12-2018 01:03 PM by ctoper11. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 01-10-2018 01:11 PM

    Writing from a list box to a text field

    Hello everyone. I deeply apologize for being back so soon but hit yet another wall with this form. I've scoured this site and have seen a number of examples on how to address my issue. I have a listbox that is pulling from a udcx data connection. It is heavily filtered using a separate SP list to weed out names according to computer name entered. In any case when a query is run the listbox is populated by software names. I would like to take that list and pass the date to a text field. I tried using the eval function but it said I'd have to remove my filter to do so. Any thoughts would be greatly appreciated. Many thanks
  • 01-10-2018 03:46 PM In reply to

    Re: Writing from a list box to a text field

     Multi-selects are strange and if you were setting the text field to a default value, you might find it doesn't always get updated. But if you just need to do this on submit, you could add to your submit rules to set the field. Not sure what kind of a filter you'd have on your double eval though? What is the data you are trying to aggregate? Is it the values selected by the user in the list box?

    Hilary Stoupa

  • 01-11-2018 06:39 AM In reply to

    Re: Writing from a list box to a text field

    I tried putting the rules on the submit button it did not work. I'm not sure about the double eval to be honest. When I first tried to put the Xpath in and chose the listbox I got a message telling me that I had a filter on that field already and if I wanted to continue I had to replace. I'm not sure if you still have it but I did send you the form not too long ago. Basically I'm pulling from a udcx data connection a list of software and there's another list in an SP list. Whatever names are on the list are compared to the data I'm pulling and filtered that way. I next want list of names that does appear in the listbox to be placed in a text field so that the workflow I have on that form library can pull it and put it in yet another list along with some other fields. Make sense?
  • 01-12-2018 11:01 AM In reply to

    Re: Writing from a list box to a text field

    Any thoughts?
  • 01-12-2018 11:11 AM In reply to

    Re: Writing from a list box to a text field

    So - you want to basically concatenate the list of items that are displayed in the list box? Has your form changed since you gave me a copy? Because that copy has three list boxes, and I'm not sure which one has the filter you want to use.
    Hilary Stoupa

  • 01-12-2018 11:35 AM In reply to

    Re: Writing from a list box to a text field

    That's exactly right. It has I've attached the new one with just the one list box. There's a field called Software I'd like to put the results in. Many thanks to you Hilary. : )
  • 01-12-2018 11:52 AM In reply to

    See if this works - I can't actually test it, of course, because I don't have access to your data, but the formula didn't seem to cause any issues.
    Hilary Stoupa

  • 01-12-2018 11:58 AM In reply to

    Re: Writing from a list box to a text field

    When I tried publishing I got the attached error. I published anyway and got the second error.
  • 01-12-2018 12:10 PM In reply to

    Re: Writing from a list box to a text field

    It may be too complicated of a filter. I actually expected you'd test it in preview first. But if IPFS can't handle it, I'd guess that this approach isn't going to work for you. May I ask what you are trying to achieve? Because it doesn't really make sense to me. :)
    Hilary Stoupa

  • 01-12-2018 12:28 PM In reply to

    Re: Writing from a list box to a text field

    Because of the heavy security here on our network I can't actually test in preview I have to publish. Basically I have a workflow on this form library that copies some columns to a list. Every column except the list box shows up and unfortunately that's the most important one as it has the list of software that needs to be installed. Does that make sense?
  • 01-12-2018 12:46 PM In reply to

    Re: Writing from a list box to a text field

    But it sounds like you don't care about what the user selects in the list box - just what shows up in the options? I'm really not sure what to recommend. If the form won't publish with the complex hard-coded filter, and you've not been able to filter dynamically (using your list of software in SharePoint) with XPath, your options are very limited. You can submit the repeating field with displayname as merged, but that will contain everything, semi-colon delimited (and I'm guessing it will be truncated). Perhaps InfoPath isn't the right tool for this job?
    Hilary Stoupa

  • 01-12-2018 01:03 PM In reply to

    Re: Writing from a list box to a text field

    That is true. The listbox isn't for the user it's for the person imaging their laptop to know the exact software they need to add to the image. And yes you're correct I did try and and submit the merged displayname and it was truncated. I think I will go with plan B and convert the form to PDF and link to it using workflow. Thanks very much for trying Hilary. This was a tough one. Have a great weekend.
Page 1 of 1 (12 items)
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.