Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

how to display particular related record


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

Recommended Posts

Posted

hi all,

am trying to do something that should be really simple.

ive got a database for a small publication, to keep track of all our clients and what editorial/advertising they have had with us.

i have got 3 related tables:

company info (addresses etc)

people

issue content (each record is an article or advertisement)

i have a layout called booking form, which displays current/future ad bookings.

on this layout, i also need to display a particular record from the people table.

the people table has a field called 'billing contact', which is basically a checkbox. the user specifies which person in the organisation is the contact for booking ads, and i want this person and their contact details to display on the booking form.

have tried to do it in a number of ways.

first i tried to create calc fields in the company table: Case(billing people::billing contact = "billing"; billing people::firstname)

at first this appeared to work, but then i realised that if there were several people related to a given company, it would only display the billing contact's name if they were the first in the list.

i thought this might be to do with it being a calculation field, so tried changing it to a text field which auto-enters (the same) calculated result, but that didnt seem to work.

then i thought maybe i should be doing it via a relationship, where there is a field in the company table that has a constant value "billing", and the relationship finds the record with the matching company ID that has billing contact selected in the people table.

i tried to do this by setting up a global field in the company table, but this didn't work, and looking back over past issues, i remembered that you cannot use global fields to do this.. correct? so tried to set up the field to auto-enter the word 'billing' and put this data in all existing records. it still doesnt work.

i tried putting the billing contact person fields on the layout both within a portal and without. it didn

Posted

okay, i seem to have got it working now. i created a new layout, using the relationship for the billing contact. the other portal which links to the issue content table still seems to work. i dont exactly understand why this is, but i am happy it is working!

another question though.. is there an easy way i can make it impossible for more than one contact in a company can be listed as the billing contact? i am guessing i would need to do this somehow with a self-join, but i dont know where to go from there. it is sort of like wanting to use the 'is unique' field validation, but only comparing with values in records with the same identifier. i figure something like this should be possible, can anyone suggest how? unfortunately there is no function for 'is unique'.

j

Posted

actually, on second thoughts i dont think the other portal (linked to issue content) is now displaying correctly. previously it was only showing current and future bookings, but now it is displaying past bookings too... arggghhh!

can anyone help? please.......!

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