Text Box 50 Character Limit - InfoPath Dev
in

InfoPath Dev

Text Box 50 Character Limit

Last post 06-01-2011 08:16 AM by AnnKInfopath. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 12-22-2008 09:15 PM

    Text Box 50 Character Limit

    Hi I'm new to all this, I have a 1 form that connects to a SQL 2005 DB.  I can retrieve and submit data.  I had to set all my Columns to nvarchar50 before the submit will work.  A limit of 50 is no good to me, I need at least 250 characters.  Does anyone have any suggestions please?

     

    Many thanks

  • 12-22-2008 09:28 PM In reply to

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

    Re: Text Box 50 Character Limit

    Hi,

    You can use text box length as nvarchar256 in the db. and make text box length as 256 limit in the infopath form.

    1. Double click on the text box.
    2. Switch to "Display" tab.
    3. Select "Limit Text box to:" check box.
    4. Enter 256 in the text box field.
    5. Click on ok.
    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 12-22-2008 09:31 PM In reply to

    Re: Text Box 50 Character Limit

    Hello

    To limit the characters of the text box you need to set property on the text box.

    1.Open the the Properties window bt right clicking on the text box control
    2.Click on 'Display' tab
    3.check 'Limit text box to' check box
    4.Enter the number of characters that you want to have limit on the text box i.e. 250
    5.Click 'Ok'
     

    Madhuri
    http://www.ggktech.com
  • 12-22-2008 10:34 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Text Box 50 Character Limit

    Hello,

    If you want to limit is minimum 250 characters then you should add validation for that field.

    Add the validation like below expression,

    string-length(.) < 250

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

    Re: Text Box 50 Character Limit

    Thank you for all you responses, unfortunately though none of the suggestions work.  I should mention that I am using a SQL2005 DB with InfoPath 2003. 

     I have set my column in the DB to NVARCHAR(MAX) don't have a datatype of NVARCHAR(256) limiting the box doesn't do anything.  I get the following error when attempting to insert more than 50 characters into this text box "Only Text string less than or equal to 50 characters is allowed".

     Any other suggestions please?


    Thanks

  • 12-23-2008 04:15 PM In reply to

    Re: Text Box 50 Character Limit

    I think that after changing your columns in SQL, you might have to 'refresh' your dataconnection in the form, so that the form 'knows' you now allow a longer number of characters. Have you tried selecting your main data connection in the Data Connections window, clicking 'Modify' and just walking through it again? Though you might want to change to NVARCHAR(250) or (256) instead of (MAX) -- I can't remember how IP feels about (MAX) and submit. By the way, even though NVARCHAR(250) isn't available from the drop down in the table designer in SQL Studio Manager... you should be able to just type it in....

    Hilary Stoupa

  • 12-23-2008 04:27 PM In reply to

    Re: Text Box 50 Character Limit

    Thanks for the reply...From what I have been reading InfoPath has too many restrictions, maybe it's may lack of SQL skills...I don't know.  Anyway I have given up and now using a Ms Access DB which works fine.


    Thanks again and Merry Christmas

  • 04-03-2009 01:44 PM In reply to

    Re: Text Box 50 Character Limit

    Just wanted to say for anyone else who may stumble upon this -- I had the same issue, and Hilary's suggestion fixed it.  Thank you!

    -- Kelley
  • 06-01-2011 08:16 AM In reply to

    Re: Text Box 50 Character Limit

    I was having this same problem- users were complaining that they were getting validation messages when they tried to submit the form.  If you right click on the red dashed area- it would give you the pop-up stating that there is a 50 character limit.  But when you go into the text box properties- no limit was set.

    After much frustration and searching all through every part of Infopath I could find- I discovered that our issue was that Access had defaulted to a 50 character limit on each field.  So the limit was invisibly transferred to Infopath.  I had to go into the database and change the limits, then go through the steps to refresh the connection as described above.  After that everything was fine. 

    Easy fix after a very frustrating search for the source.... not unusual in my experience with these programs.

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