using check box to automatically input text - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

using check box to automatically input text

Last post 12-29-2008 12:23 PM by fallaway. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 12-02-2008 07:20 AM

    using check box to automatically input text

    I am wondering if there is a way that once a user selects a check box, I can have the data it is representing input with a time/date/username stamp in the rich text box that is read only?

  • 12-02-2008 08:09 AM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: using check box to automatically input text

    Use a rule on the check box that is triggered by the check.

    Ex: When Check Box Condition = True

    Add Action:

    Set Rich Text Box Default Field Value to " concat(now(), today(), userName()) " format accordingly.

    Hope this helps.

  • 12-02-2008 09:33 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: using check box to automatically input text

    Hi,

    If we add the Now() and Today() functions, then date will be displayed two times.

    Try this.

    concat(now(), " ", userName())

    or

    concat(substring-after(now(), "T"), today(), userName())

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 12-02-2008 09:40 AM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: using check box to automatically input text

    Yes this is true, thanks Anuma.

    Also remember as Anuma has displayed above, feel free to use " " or " _ " or any variation similar to Excel formuals to seperate the fields as much as you want.

  • 12-02-2008 09:59 AM In reply to

    Re: using check box to automatically input text

    Here is what I am trying to use but I know I am doing something wrong with the syntax. Sorry I am just learning all of this.

     

    substring-after(now(), "T"), "  ", userName(), DAY_TEXT_1.0

     

    What I am wanting to see is when a user checks the box I get Time (MILITARY) Username What ever was in the text box that they checked. We I trying to ad some you uniformity and accountability to our NOC and this will be a Daily Turnover & Duties log

  • 12-02-2008 10:09 AM In reply to

    Re: using check box to automatically input text

    You are missing the concat:

    concat(substring-after(now(), "T"), "  ", userName(), DAY_TEXT_1.0)

    Hilary Stoupa

  • 12-02-2008 10:28 AM In reply to

    Re: using check box to automatically input text

    its always the darn cat; I thought something looked amiss, that is working, thank you! next question is There are about 10 Check boxes is there formula to add to what we have now so that it will start a new line in the Rich Text Box,

     

    Also and less important than the above is there a way to make the text box default to using bullets?

  • 12-02-2008 12:02 PM In reply to

    • jrudolph
    • Top 150 Contributor
      Male
    • Joined on 07-02-2008
    • Orlando, FL
    • Posts 67

    Re: using check box to automatically input text

    On the first part of your question. I dont think this can be done without using managed code or without creating a ton of rules that have different combinations of the items you want displayed.

    Another option since you are using a "Read Only" text box anyways is to create a "section" and make the border of the section be a thin line, to emulate what a rich text box would look like. Then create 10 Text boxes with the default values set to what you desire inside of them. This method might allow you to add the bullet with some formatting. Then make it so that the  text boxes are hidden unless the check mark is = True, using conditional formating. This method is probably better only if you are not extracting the data for use else where.

    I may be wrong and would like to know if anyone else has a better way of doing it myself.

    Hope this helps.

  • 12-03-2008 08:28 AM In reply to

    Re: using check box to automatically input text

    Thanks for the help and info, we decided not to go with this option.

  • 12-29-2008 11:00 AM In reply to

    Re: using check box to automatically input text

    When I try those formulas, I get the error:

     ---

    'username' is not a valid XSLT or XPath function.

    concat(substring-after(xdDate:Now(), "T"), "  ", xdDate:Today(), -->username()<--)

    ---

    Is this because I'm using InfoPath 2003? TIA!

  • 12-29-2008 12:14 PM In reply to

    Re: using check box to automatically input text

    Yes, that is not a function in IP2003.  Also, it's userName() (in IP2007).  Instead of typing things out manually, it's best to choose the function in the wizard so that you don't make any syntax mistakes at least until you master it.

  • 12-29-2008 12:23 PM In reply to

    Re: using check box to automatically input text

    Thanks for the quick reply - and darn, so much for that nice easy solution. Is there another way to pull a user's name? I want to record the user and date/time when they check a box, and this would be for about 6 check boxes, each potentially with a different user checking them.

    The list of functions is quite limited!

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