November 4, 200520 yr Hi guys, Ok so i have a calculation field called imagedetails that looks at image using the getasText function and this is what is coming up for it. size:184,245 image:6028.jpg imagemac:/6028.jpg So what i want to do is do a search for images that have a bigger height than their width and visa versa. I cant get my head about getting the substring to work as the image height or width may have more that 3 digits.
November 4, 200520 yr Try something like: Let ( [ text = GetAsText ( yourContainerField ) colon = Position ( text ; ":" ; 1 ; 1 ) ; comma = Position ( text ; "," ; 1 ; 1 ) ; end = Position ( text ; ¶ ; 1 ; 1 ) ; h = GetAsNumber ( Middle ( text ; colon + 1 ; comma - colon - 1 ) ) ; v = GetAsNumber ( Middle ( text ; comma + 1 ; end - comma - 1 ) ) ] ; h > v ) Set the result to Number. This will return 1 for landscape-oriented pictures, and 0 for portrait type.
December 18, 200520 yr Hi How did you get that image details ? When I GetAsText(container) it only gives me the path ?
Create an account or sign in to comment