Forum Discussion
- MattStephensQrew Cadet
Are there other possible email subject formats?
Are your sales orders always 7 digits?
You could use something like this:
var text string = [Subject];
//If the end of the string is a bracket, take the number from within the brackets
If(Right($String,1)=")",NotRight(NotLeft($String,"("),")")//Otherwise, take whatever is right of the last space
Right($String," ")I haven't tested it, but something like that should work.
- QuickBaseCoachDQrew CaptainI tested this and it works :)
var number A = ToNumber(Part([Subject],1," -(),"));
var number B = ToNumber(Part([Subject],2," -(,)"));
var number C = ToNumber(Part([Subject],3," -(,)"));
var number D = ToNumber(Part([Subject],4," -(,)"));
var number E = ToNumber(Part([Subject],5," -(,)"));
var number F = ToNumber(Part([Subject],6," -(,)"));
Max($A, $B, $C, $D, $E, $F)
I suggest continuing the pattern up to as many words you think are possible before the numbers. So just go to say ABCDEFGHIJKLM
The characters in these quotes here " -()," need to be all the ones which might precede or directly follow the numbers.
Mark- MeaganMcLeodQrew TraineeThank you! That worked great.