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.

Need calc so self-joined portal will highlight the current record

Featured Replies

Greets, all:
 
Here's what I'm trying to do (please refer to the attached): I have a portal via a self-join with the current table that stores addresses. What I'd like to happen is that the address in the current record (on the left) be highlighted in its related record in the portal (on the right). Obviously, this uses conditional formatting but the I don't know how to set up the calculation; at first I thought that the key field could be used to compare the current ID in the current/parent record to the child record in the portal, but nope, that's not it since they share the same fields. :S
 
I'm sure it's a simple calc, just that I can't think of it. (Being old sucks!)  TIA for your help!

post-76798-0-05263100-1377003028_thumb.p

 

at first I thought that the key field could be used to compare the current ID in the current/parent record to the child record in the portal, but nope, that's not it since they share the same fields. :S

 

 

You were on the right track; it's the same field, but the value in the native TO (of the layout) will be different from the one in the related TO (in the portal) – except for the portal row that is the current record itself!

 

So the CF calculation reads simply:

layoutTO::keyField = portalTO::keyField

It depends upon what the self-join relationship is based upon.  If Cartesian join then using ID to ID comparison would work if there is only one matching ID; it wasn't clarified whether the ID was the foreign key or the primary and it would matter. If foreign key then there may be several in that table with the same ID.  If it is joining ID to ID then ALL records in the portal would share the same ID so they ALL would highlight if using that comparison.

 

To distinguish whether a specific record from the portal matches a specific record from the parent on that field alone, it might be:

 

Address 2::AddressFull_lct = Address::AddressFull_lct

 

This would already filter down based upon the existing relationship between them so if the relationship were based upon ID, the result would require it to be the same ID and further match on the address.  On the other hand, if the relationship were Cartesian then the match would be based upon the address field alone.

Self = <ParentTable>::AddressFull_lct

  • Author

Thanks, all! Yes, LaRetta, it's the primary (ID) key.

 

Fitch's solution reminds me about the many uses of Self--it's a versatile command that I don't use nearly enough...and should.

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.