I need to format this Arcade code to include if statement but not sure how. The num field can be either 9 or 10 digits so I need to be able to include a statement if it's 9 digits do this or if it's 10 digits do this. How can I do this?
var Num;
Num = $feature.Num;
// if 10 digit run this
//var txt = Left(Num, Count(Num)-6)
//var txt1 = Right(Num, Count(Num)-4)
//OR
// if 9 digit run this
var txt2 = Left(Num, Count(Num)-5)
var txt3 = Right(Num, Count(Num)-4)
var url = "https://rec-search.Yoyo/find/search.asp?dfYear="+ text(txt2) + "&dfDocumentStart=" + text(txt3);return url;