You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy check rtps for comma and throw error

Summary:

I am looking to add logic to an existing Groovy rule we have that adds dynamic children to our projects hierarchy. I need to add logic that checks the rtps.rtp_Project_Name for commas and throws an error if there is a comma in the string. I tried adding the following but it is throwing a validation error.

// Check for commas in the new project name
if (rtps.rtp_Project_Name.contains(",")) {
throwVetoException("Project name cannot contain commas.")
}

Content (please ensure you mask any confidential information):


Version (include the version you are using, if applicable):



Code Snippet (add any code snippets that support your topic, if applicable):

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!