Skip 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.

Field By Calculation

Featured Replies

Hi gang,

I have a script that uses a variable to determine which fields contents are to be set into another field. For now I have the following script:

If [right ($$v_Diagram;2) = "01"]

Set Field [iSP::Diagram_orig; ISP::Photo 01]

Else If [right ($$v_Diagram;2) = "02"]

Set Field [iSP::Diagram_orig; ISP::Photo 02]

Else If [right ($$v_Diagram;2) = "03"]

Set Field [iSP::Diagram_orig; ISP::Photo 03]

I have 20 different possiblilities.

I would like to have a single script step that would set the field using a calculation. I know there is no "field by calculation" step, is there another way to do this?

Thanks

In your example, you are always setting the same field. Only the contents change - and that can definitely be a calculation.

  • Author

Yes but the contents are another field.

That doesn't matter. This single script step:

Set Field [iSP::Diagram_orig;

Let (

test = Right ( $$v_Diagram ; 2 )

;

Case (

test = "01" ; ISP::Photo 01 ;

test = "02" ; ISP::Photo 02 ;

test = "03" ; ISP::Photo 03

)

)

]

will do exactly what your example above does. The calc can probably be shortened further using Choose() or Evaluate(), e.g.:

Evaluate ( "ISP::Photo " & Right ( $$v_Diagram ; 2 ) )

  • Author

Awesome! worked great thanks

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.