count no of Characters in Richtextbox control in infopath RRS feed

  • Question

  • Hi All,

    Can anybody tell me how to count the Number of characters ,while entering in the RichTextBox control and have to display the no of characters in the above 






    Regards, Mansoor
    Thursday, October 28, 2010 9:22 AM

All replies

  • How did you try to do it so far?  Did it not work?  What happened when you counted the characters?  If you didn't know what command to use, then try creating a field and setting its default value to string-length(RichTextField).  I'm not sure how well it works for rich text, but I know it works for plain text fields.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Thursday, October 28, 2010 4:23 PM
  • Hi Clayton,
    First, Thanks for your quick response.
     In RichTextBox, Can't we limit no of Characters like we have option in TextBox property. If we set limit no of Characters as a 10. we can't enter 11 charter. Same way Is it possible in Richtextbox control.
    and i have one more requirement. , check the below link in this site , it showing the no of charters while typed in the textbox .
    Can u tel me how can we do this ? appreciate to do this help, if send any reference links and code.
    Thanks mak...!

    Regards, Mansoor
    Saturday, October 30, 2010 4:49 AM
  • I don't understand your reply.  I thought I answered the question.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Saturday, October 30, 2010 8:20 AM
  • Hi Clayton,

    I have two requirments ,

    1. In RichTextbox , dont want to exceed more than 10 Charcters .

    2.In above link, which i was send early ,if u see the bottom page the same functionlatiy have to apply.

    Please reply if u dont understood my question.



    Regards, MAK..!
    Saturday, October 30, 2010 10:17 AM
  • Hi, Did You get any solution for this problem?

    Please share with me if you got. I too have the same requirement.

    Thursday, February 21, 2013 6:58 AM
  • Hi,

    we can't set limit no of Characters for richtextbox like text box in InfoPath form. But you able to set a validation rule and show the error message to the user.

    Get the character count using string-length(.) > 1000.

    Write two rules.

    1. Get the count and show in a another read only text box

    2. Validate and show the error message in readonly text box

    When move from the control you will get the message.

    Thanks and Regards Jenkins

    • Proposed as answer by NS Jenkins Friday, May 29, 2015 1:22 PM
    Friday, May 29, 2015 10:13 AM