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.

Copy field value into another field

Featured Replies

  • Newbies

HI!

I am trying to make a script which should say:

If (field A = "Yes")

then field C copies the value of filed B

End if

If (field A = "No" or field A is empty)

then field C takes the value 0

End if

My problem is making the "then" commands. what type of scriptcommand should I use? I've tried look up, replace, copy/paste and nothing works!

I don't know where to place the script either. Can I add in one the fields A, B and C, when they already do have a value? It would be optimal if when I press "yes" in field A, that field C right after takes the value of field B. Should the script then be placed in field A? When I've tried to do that it seems as if i can't press "Yes" then.

Hope somebody can help me, and ask if i'm not making sense or is clear in my discription.

Regards, mille

Just make FieldC a calculation field.

Then the calc would just be: Case ( field A = "Yes"; FieldB; 0 )

Hi mille, and welcome to the forum.

John (Mr. Vodka) has provided you with one way, by using a calculation, and that is the way I would go. However, if you are wanting to see how this could be script, it would like this:


If [ yourFile::Field A = "Yes" ] 

   Set Field [ yourFile::Field C; yourFile::Field B ]

Else 

  If [ yourFile::Field A = "No" ]

    Set Field [ yourFile::Field C; yourFile::Field A ]

    Else 

      Set Field [ yourFile::Field C; "" ]

  End If 

End If

HTH

Lee

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.