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?
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?
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?
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.
@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?
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.
@Mobile_Tuberculosis ah, so I could reference that virtual column in the form viewโฆ makes sense! But even before the form is saved?
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โ.
Thanks for your help!
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?
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |