I have a set of data that I need to filter for the items that begin with 16 in a certain field. This field is currently a double data type. My first attempt was to change the data type to string using the "select" tool and then filter with the "starts with function" but I keep getting an error. am I doing something wrong? Can someone help me?
Maybe use a filter that uses an expression like
Left(ToString([Field]), 2) = "16"
Hi @rdeeparnell
You function should be something like this
StartsWith(ToString([Field]), '16')
Hope this works. If not whats the issue you are facing.
hmm what was the error? I guess some possible causes might be to do with nulls, zeros, non-numbers, or string type/length (v_string or vw_string type rather than just string).
For sanity's sake, because you can preview the field etc in designing, I would use a formula field, and create two fields. One, call it TESTING and have type=V_String, enter ToString([field name]),2). Second, call it FILTERING FLAG, type=Boolean, and enter TESTING="16". Then, after those formulas, add a filter tool for cases where FILTERING FLAG is true.
Of course,you can do this directly in one filter tool, but the additional step may help pinpoint the cause of the error. Coupled with a browse tool you can see how each record results, which will help you if you're still struggling (you can then play and test different formulas in the TESTING field).