Skip to main content

How to trim a string value from a string?

Trim

For Textexample: Values in Scenario Editor

Trim text values when leading or trailing whitespace would make a validation or data mapping unreliable.

  • TrimNeed only whitespace" that14393430" is not meaningful tofrom the businessstring value.
  • Normalize"Cart valuessaved consistentlyas beforeQuote comparison.
  • Keep: 14393430" use the originalbelow value visible in output when troubleshooting.
  • Avoid trimming IDs, codes, or fixed-width values unless approved.

Validation workflow

  1. Capture the source text.
  2. Apply trim or normalization logic.
  3. Compare the cleaned value with expected data.
  4. Store the cleaned value if downstream steps need it.
function:

var quote = "Cart saved as Quote : 14393430"

var quotenum=quote.substring(quote.indexOf(':') + 1)


Last updated: SeptemberJune 20,26, 20262023

If you have any feedback on this topic, please contact us at documentation@appvance.ai