Jump to content
Server Maintenance This Week. ×

fk of join table won't connect but 'go to related' script does


apinrise

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

Recommended Posts

I have a table Exhibitions for photographic prints. Sometimes we only know the unique number of the Image in the print, other times we know the Image No. and the Print No., and some times we only know the Print No.. (Images have multiple prints, prints only come from a single Image.)

We have a join table to connect Exhibitions with Prints and also with Images. There are two fields in our join table fk_PrintNo and fk_ImageNo.

When there is a PrintNo. value in the portal row, the c_Thumb field of the join table gets the thumbnail from the Print record, and if there isn't a PrintID but there is an ImageID, the c_Thumb field gets the thumbnail from the Image record.

However, it only gets the Print thumbnail if there's ALSO a value in the Image field. Even when I test by putting the Print record ID field in the portal layout it only shows up if there's also a value in the Image fk field. (See screenshot below.)

I've also attached the ERD.

 

Screen Shot 2019-01-21 at 7.27.11 PM.png

Screen Shot 2019-01-21 at 7.27.30 PM.png

In the layout screenshot above, Ref JPEG is the Image No., and the row with the Image header is what I replaced with the Print No. to see if the join field was bringing in any of the data from its related record...which you can see it isn't until Image No. has a value and connects to its related record.

 

And just to add, when I'm looking at the Prints layout, I do see the correct Exhibition information (even if there isn't an Image No.)

Edited by apinrise
Link to comment
Share on other sites

That should work, and since it does not reference the Image fk field, it should not depend on it having a value. So there's something wrong with your setup that's not mentioned in your description, because you are not aware of it.

Check that the layout belongs to the correct TO; that the portal points to the correct TO; that all the fields in the portal are fields from the correct TOs; and that the TOs on your relationships graph are TOs of the correct base tables.

Link to comment
Share on other sites

Hmm. The Exhibitions layout is correct, and the portal is the join table, and each of the fk fields point to their respective related tables. I've checked that the connecting fields are of the same type (all Text fields).

Any clues on what else it could be?

Link to comment
Share on other sites

You're right...in the file I sent you it does now work. I don't understand what the difference would be. The original with all the records is set-up the exact same way, I just removed the extra records and created a few fake ones for you to test--but the names are the same so I'm not sure why one would work but not the other...

Link to comment
Share on other sites

Okay I figured it out but I'm now concerned about a more significant glitch: 

The field for c_Img in my original file didn't show having a value for "Hide object when" (for me) and neither did the ">go to original" link, yet both of them were disappearing from the portal when the now-invisible value returned true. I deleted the ">go to original" link object and added it again and now it shows! Same with c_img! It's as though the "Hide object when" attribute was stuck with the original value even though it was showing as removed.

Edited by apinrise
Link to comment
Share on other sites

Looking at the posted file again, it appears the  c_Img field is grouped with some other object. The hide condition appears only after you click again to select the field within the group. Did you try to make it a button at some point, then change the button to do nothing? I believe that would explain it.

Link to comment
Share on other sites

This topic is 1921 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.