Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Getting Multiple Values from GetContainerAttribute in one Field?

Featured Replies

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)

539288020_ScreenShot2020-06-11at05_02_47.png.f6f76e0797c73ce78243e4d9fab427b7.png1550270379_ScreenShot2020-06-11at05_06_36.png.04187564976946a47641f8b81309bbdf.png

Would there a "better" way to do this kind of thing? ...

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 by comment

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.