August 20, 201312 yr 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!
August 20, 201312 yr 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
August 20, 201312 yr 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.
August 22, 201312 yr 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