Skip to main content
May 29, 2023
Solved

character count is different in paragraph field when compared to word document

  • May 29, 2023
  • 13 replies
  • 0 views

Using the below code to trim the character count and limit the characters below 65000 in a paragraph as the character count in the interface is different from the character count when we paste the same in the word document.please suggest changes and attached the screenshot of interface count and character count

if(
local!isEdit,
a!paragraphField(
value: fv!item.body,
saveInto: fv!item.body,
characterLimit: 65000,
showCharacterCount: true,

height: "TALL",
validations: if(
len(fn!trim(
fn!substitute(
fv!item.body,
char(10)," ")
)
) > 65000,
"The communication you are trying to send exceeds the character limit allowed. Please send a modified version of the letter to not exceed [65000]",
null )

    Best answer by stefanhelzle0001

    Is there a specific reason to add a separate validation to check the length? This is already handled by that field.

    In my experience, using any sorts of "office" software as a reference for anything related technical is a bad idea. Did you try to copy that text into a real text editor and let that count the characters?

    13 replies

    stefanhelzle0001
    Brainy
    May 29, 2023

    Is there a specific reason to add a separate validation to check the length? This is already handled by that field.

    In my experience, using any sorts of "office" software as a reference for anything related technical is a bad idea. Did you try to copy that text into a real text editor and let that count the characters?

    May 29, 2023

    @stefanHelzle

    yes,for used validation as it needs to generate error message if it crosses 65000 and

    its the same count in other text editors as well.

    stefanhelzle0001
    Brainy
    May 29, 2023

    Are you aware that defining the characterLimit parameter will automatically do this kind of validation for you?

    What do you mean with "its the same count in other text editors as well."? Same, compared to what?