Add / remove text from a textbox - InfoPath Dev
in

InfoPath Dev

Add / remove text from a textbox

Last post 03-01-2010 12:42 AM by mhoel. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-26-2010 05:19 AM

    • mhoel
    • Not Ranked
    • Joined on 01-25-2010
    • Posts 17

    Add / remove text from a textbox

    Hi.

    I have 7 dropdown menus with user initials, that are used for approval purpose. Not all of them needs to be selected. But when they have been selected and i press a button, i want to add those who have been selected to a textbox seprareted by ", ". This is not a problem. But when the selected users are approving by pressing another button, i want their initials to be removed from this textbox plus the ", ". Is this possible?

    Thanks in advance!

  • 02-26-2010 06:11 AM In reply to

    Re: Add / remove text from a textbox

     Do the initials need to be listed in the order they were appended, or can they be in any order?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-26-2010 06:17 AM In reply to

    • mhoel
    • Not Ranked
    • Joined on 01-25-2010
    • Posts 17

    Re: Add / remove text from a textbox

    They can be in any order.

  • 02-26-2010 06:56 AM In reply to

    Re: Add / remove text from a textbox

     You can use this formula to concat all of the non-blank items into a comma-separated list:

     eval(eval((field1 | field2 | field3)[. != ""], 'concat(., ", ")'), "..")

    In the bold underlined part, you would list out all of your fields (use the Insert field or group... feature), separated by pipes.

    This will append a comma at the end of the list, so if you don't want the final comma, you can use a substring() function afterwards to remove it.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-26-2010 07:02 AM In reply to

    Re: Add / remove text from a textbox

     After reading your original post again, I realized that the above doesn't answer your question.  I will mull over it and see if I can think of a good solution.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-01-2010 12:42 AM In reply to

    • mhoel
    • Not Ranked
    • Joined on 01-25-2010
    • Posts 17

    Re: Add / remove text from a textbox

    I need to add some more information too.

    When a user opens the form, i have a field that are being updated with their initials and my idea to this, was using this field to remove his initials from the textbox.

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