Skip to main content
vineethk0001
May 19, 2021
Question

Count of Characters in Paragraph field

  • May 19, 2021
  • 9 replies
  • 0 views

Hi All,

     I have a Paragraph field in the grid, which i have limited to 500 char, but i want to show the count of characters below the paragraph, for that am using Instructions,still with no luck,

    Can anyone please help me on this,

    

a!paragraphField(
                              value: fv!item.comments,
                              saveInto: fv!item.comments,
                              height: "SHORT",
                              instructions: "Number of characters " & len(fv!item.comments) & "/500",
    refreshAfter: "KEYPRESS",
                              disabled: if(
                                local!accessoftheGroups = cons!CMP_GROUP_ACCESS_VALUES[2],
                                true,
                                false
                              ),
                              validations: if(
                                len(fv!item.comments) <= 500,
                                "",
                                "500 characters maximum."
                              )
                            )

    Thanks in advance

Warm Regards

Vineeth

    9 replies

    Inspiring
    May 19, 2021

    Sharing this sample code it will help you

    a!localVariables(
    local!para,
    a!paragraphField(
    value: local!para,
    saveInto: {
    local!para,
    },
    height: "SHORT",
    instructions: "Number of characters " & len(local!para) & "/500",
    refreshAfter: "KEYPRESS",
    validations: if(
    len(local!para) <= 500,
    "",
    "500 characters maximum."
    )
    )
    )

    Inspiring
    May 19, 2021

    For Grid you cannot show instruction

    vineethk0001
    May 19, 2021

    Thank you Gaurav, is there any way i can achieve showing the count of characters

    Inspiring
    May 19, 2021

    Either you can give some additional field in the right side to show the count but that's not at all recommended.

    Other thing you can try is give one text field on top or bottom in readOnly format just to display the length of paragraph you are currently working with...here you will need one extra local variable to store the length of the filed and that you will use as value in the text field