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.

Problems with GetField from a multi-criteria related table

Featured Replies

Hello,

I'm adding a field to an existing database. I'd like this field to get a value from a field in another table based on two criteria. The tables (A and B are related by two criteria (1 and 2).

Right now I have:

If ( A1 = B::B1 AND A2 = B::B2; GetField ( B::B3 );"")

But nothing happens.

I'm a novice, so any suggestions on better code would be greatly appreciated.

It would probably be better to define a relationship between the two tables, based on matching the two fields. Then either place the third field on your layout, or fetch it through a calculation field. Note also that the GetField() function is not required here and will not work the way you have used it.

P.S. Please use meaningful names for your tables and fields - we are not robots.

so, if you have two tables: A, B

and you have the relationship (A::A1= B::B1 AND A::A2=B::B2), the VALID relationship is already set up. Just put the B::B3 field on the layout based on that relationship, as Comment says. no need for IF, no need for get field. or create a calculation:

if( not IsEmpty (B::B3)

; B::B3

; ""

)

Beverly

if( not IsEmpty (B::B3)

; B::B3

; ""

)

Well, if it is empty... :hmm:

  • Author

Just had to recheck my relationships. Thank's everbody for the help

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.