How can I remove the end of a string if I am not sure what it will be?
Example, it could end in 3, 016 or P00004.
Modification No. 3
Modification No. 016
Modification No. P00004
I need to remove everything after Modification No. and add another variable.
If it’s always going to say "Modification No. " why even bother removing the end of it? You don’t even need to read it at all, you can just hardcode in that portion of the string
@Jessica_Moseley f you’re removing everything after Modificaiton No. I still don’t understand why you’d need to remove it at all? Instead you can just do: "Modification No. " + YourReplacementTextHere where YourReplacementTextHere is the string you want to insert. No need for reading the string prior and replacing
I see the logic but when I assign newVariable= “Modification No.” and then assign newVariable= myVariable.substring(0,16), it’s not removing what comes after Modification No. when I use my Replace Text activity
I am saying you don’t need to pull in any of the text that contains “Modification No.” or what follows. Instead, just hardcode the beginning of your output string to be “Modification No.” and then append whatever you want the new string text to be.