Adding a name to a text field and concat - InfoPath Dev
in

InfoPath Dev

Adding a name to a text field and concat

Last post 02-19-2015 02:15 PM by jlgpsidev2010. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-18-2015 11:30 AM

    Adding a name to a text field and concat

    Hi I have a problem with a browser form. I am not sure how to resolve and am hoping for help.

    I have created a form for people to sign up for writing proposals. if you click "click to signup" it adds a row to the repeating table behind the scenes and you get a button to click. When you click the button it adds your name to the "Management Approach Writers" textbox using "substring(eval(eval(ManagementApproachNames[. != ""], 'concat("; ", .)'), ".."), 2)". Works PERFECTLY! Problem is management wants ONE CLICK to add a name and submit the form. See below.

     

     Is it possible to do this without a repeating table? What I would like to do is click Sign-up and add the user to the Management Approach Writers without the repeating table. Is this possible? Otherwise, I can't do this with one click. It just replaces the previous name in the box with the current user. I hope this makes sense. Thank you in advance. 

     

    Filed under:
  • 02-19-2015 10:40 AM In reply to

    Re: Adding a name to a text field and concat

    Hi - Your screenshots aren't showing. But I would think you would to use a default value for ManagementApproachWriters with your double eval instead of having it on a button click? Another option would be to change the form Submit to use rules, and have your first rule set the field, just like you do now with your button click.

    Hilary Stoupa

  • 02-19-2015 02:15 PM In reply to

    Re: Adding a name to a text field and concat

     Hillary,

    Thank you for the response. Management wanted the form to be completed with "one click". What I ended up doing is putting rules on a button that completed everything. 

    set field's value: namesMAW = CurrentLoggedIn
    set field's value: ManagementApproachWriters = concat(namesMAW, newline, ManagementApproachWriters
    Submit using a dataconnection: Main Submit
    Close this form: No Prompt

    If the  CurrentLoggedIn name is already in the list I hide the signup button and show the "You are signed up for this section!" and if not, the Sign Up button shows. In the form the newline provides the carriage return in the textbox.

    I did extensive testing. It works great.

    Thanks again Hillary.

    Jamie 

     

     

     

     

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