You appear to have quoted the attribute in the substring. This means it is using it as a literal string value, rather than taking the value from the other object attribute. You’ve also asked for a length of 72, but the literal string you are using isn’t long enough so is failing. It’s worth using the length function to check the length of the string before trying to take a substring from it.
Try something like this instead...
if length($AF_Recived/Rowdata) > 72 then
substring($AF_Recived/Rowdata, 0, 72)
else
$AF_Recived/Rowdata
I hope this helps.