Jump to content
Server Maintenance This Week. ×

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


This topic is 3901 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 3901 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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