error i have

Hi, It keeps saying I have a type error and that my substring is not a function and I am unable to fix this. It says this error on 3 lines any idea how to fix it?

When substring is not a function, it implies that the thing you are working with isn’t a string. I recommend looking at your Data Source. If the field you getting isn’t in “” then it’s not a string and is probably a number and you should use it as a number.