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.

Automatically set value from the value list when other value is selected

Featured Replies

Hi!

I'm trying to create a script that would automatically set value in the radio button field from the assigned value list when value from the other list is manually selected to a drop-down field.

Any help would be appreciated..

TNX!

Your question is not clear. How would the script (or another mechanism) know which value to select?

  • Author

I guess this should be defined as the calculation in the auto-enter options of the field.. Something like, IF Field 1= value a THEN Field 2=value b.

Sorry, if this doesn't make too much sense, I don't know how to explain it more precise.

 

 

 

6 minutes ago, sinisa93 said:

I don't know how to explain it more precise.

That's easy: don't try to abstract your problem. Instead, explain what you have so far and what are you trying to accomplish and (most importantly) for what purpose - using actual table and field names.

The most problematic part here is what I asked about earlier. What do the values "a" and "b" in your abstract example represent in real life? Because it is very likely that these values will change at some point - and you would not want to hard-code them into the calculation formula.

  • Author

Hi!

OK, you're right. 

I have a drop down field "Belts" that uses value list of several items (karate belts of various colors) and other radio button field called "Rank" that uses different value list with only three items in the list (beginner, intermediate, advanced). So, certain belts fall under one of those three ranks/items. What I could do is to manually choose specific belt and then designated rank but what I would like is when I manually choose specific belt that designated rank is automatically assigned. 

 

The proper solution would be to have a BeltTypes table with fields for Color (validated as unique) and Rank. Then you can display the related Rank field on your layout where the drop-down field is (I presume that would be in a portal to the Belts table, placed on a layout of Members).

---
P.S.  If you have followed the advice given in your previous question, you already have a table named Belts. In this arrangement, this table would become a join table between Members and BeltTypes.

 

Alternatively, if you are sure that the colors will always remain the same rank, you could make Rank a calculation field =

Case (
Color = "White" or Color = "Yellow" or Color = "Orange" ; "Beginner" ;
Color = "Blue" or Color = "Green" or Color = "Brown" ; "Intermediate" ;
Color = "Black" ; "Advanced"
)

 

1 hour ago, sinisa93 said:

I guess this should be defined as the calculation in the auto-enter options of the field..

Auto-entered values make sense only if you want to give users the ability to override them. Otherwise use a calculation field.

 

Edited by comment

  • 2 weeks later...
  • Author

Hi!

Just to let you know, that I applied your solution and everything works fine. Thank you for your time. :)

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.