June 11, 20205 yr I'm trying to get a field to show me: (Image Width) x (Image Height) Using a calculation for the field content I can get one or the other. Let ( a = GetContainerAttribute ( ISBN_Cover ; "width" ) ; a ) So I'm thinking something along the lines of (below) -which obviously does not work- But how do I.. Let ( a = GetContainerAttribute ( ISBN_Cover ; "width" ) ; b = GetContainerAttribute ( ISBN_Cover ; "height" ) ; a & ¶ & "x" & ¶ & a ) In the process of posting this question, it occurred to me, "the other side of the semi-colon is the output, but what about embedding another calculation in there too?" ...and that worked. So: Let ( a = GetContainerAttribute ( ISBN_Cover ; "width" ) ; Let ( b = GetContainerAttribute ( ISBN_Cover ; "height" ) ; a & ¶ & "x" & ¶ & b )) Gives me what I want. (Image Dimensions next to the image) Would there a "better" way to do this kind of thing? ...
June 11, 20205 yr 25 minutes ago, Tony Diaz said: So I'm thinking something along the lines of (below) -which obviously does not work- But how do I.. Let ( a = GetContainerAttribute ( ISBN_Cover ; "width" ) ; b = GetContainerAttribute ( ISBN_Cover ; "height" ) ; a & ¶ & "x" & ¶ & a ) It doesn't work, because multiple variable assignments within the same Let statement must be enclosed in square brackets: Let ( [ a = GetContainerAttribute ( ISBN_Cover ; "width" ) ; b = GetContainerAttribute ( ISBN_Cover ; "height" ) ] ; a & ¶ & "x" & ¶ & b ) Of course, a & ¶ & "x" & ¶ & b could be shortened to: a & "¶x¶" & b or (perhaps preferably): Let ( [ w = GetContainerAttribute ( ISBN_Cover ; "width" ) ; h = GetContainerAttribute ( ISBN_Cover ; "height" ) ] ; List ( w ; "x" ; h ) ) Edited June 11, 20205 yr by comment
Create an account or sign in to comment