I might be missing something: In my app, I h...

(Jesse Prud'Homme) #1

I might be missing something:

In my app, I have a ‘Customers’ table and a ‘Contacts’ table. In the ‘Customers’ table, there is a ref to the ‘Contacts’ table. In the form view, when adding a new contact in the ref field, how can I prepopulate the customer to be that of the customer I just entered before saving the forms?

(David Ackling-Jones) #2

Mark the “Is Part of” property in the ref column as true. So then when you add or edit a Customer, you will be able to add to the list of contacts related to that customer from within the Customer form. Is that something you have already tried?

(Jesse Prud'Homme) #3

I’ll try that.

Further, I also have a “Job Profile” table that is intended to reference the Customer, Contact, Site Address and others. Is there a way to prefill the ‘Site Address’ ref form based on the ref’d customer?

(Mobile Tuberculosis) #4

Depending on where the data is coming from (i.e. which is your ref column), you can put: [SourceTable].[SourceColumnInThatTable] as app formula for Site Address to prefill the column with data from another table. Just change the values.

(Jesse Prud'Homme) #5

@Mobile_Tuberculosis It’s for the ‘Site Address’ form when creating a new row from the ref column. Is there a way to back reference the first open form entries?

(Mobile Tuberculosis) #6

Oh sorry, I misunderstood. I thought Site Address was a column. When you have a ref column, the table will be listed in-line when the referenced table’s details view is accessed. When a new form is created there, the ref column is auto-populated.

(Jesse Prud'Homme) #7

@Mobile_Tuberculosis ah, so I could reference that virtual column in the form view… makes sense! But even before the form is saved?

(Mobile Tuberculosis) #8

Yes, if you mark “IsPartOf” as “True” as @David_Ackling-Jones said. However, you can only do this to one back-reference column. In the spec, this is defined as a relationship of “is composed of”.

(Jesse Prud'Homme) #9

Thanks for your help!

(Aleksi Alkio) #10

For your original question… do you want to have lot of customers for one contact? It sounds you want lot of contacts for one customer. Or have I understood your request wrongly?