trim() not working

Certified Associate Developer

Hi,

I have text field in an interface and I need to trim the Leading and trailing spaces for the value if there any. So I have used trim() as in below code. I tested by giving some sample text with leading and trailing spaces, trim() has removed all the trailing and leading spaces in the interface. But when I checked the CDT to see how it stored, the spaces are still there and it is carrying forward the same value to next screens also.

Can anyone please help me in resolving this. 

 

            a!textField(
                    label: "Bundled Submission Description",
                  labelPosition: "ADJACENT",
                  value: trim(ri!bundle.submissionDesc_txt),
                  saveInto: ri!bundle.submissionDesc_txt,
                  required: true,
                  validations: rule!RGRACSLBL_FN_getTextLengthValidationMessage(
                    input_txt: index(
                      ri!bundle,
                      "submissionDesc_txt",
                      {}
                    ),
                    length_int: 100,
                    validationMsg_txt: cons!RGRACSLBL_TEXT_VALIDATION_MSG[16]
                  )
                )

  Discussion posts and replies are publicly visible

Parents Reply Children