I’ve got a property management company.I’m working on a DB to track issues with any given property.
I have a form called property card with a field called “address”.
I have another form called inspections. When you create an inspection, you choose an address to go along with it to be used as a key field.
I’m trying to show a list of inspections for any given property on the Property card.
I assume, I need to embed a view into the property card, but don’t know how to restrict it to showing only inspections from the parent property.
Any help would be appreciated.
Jim Lamb
Real Estate Depot
Subject: Embeded View
Pass a unqique key to a computed when composed field on the inspection form (Perhaps the property name, address, or some other unique key). Then use this value, which is also stored on the property form to calculate the single category.
I would not use the UNID of the property document because this can cause you problems if something happens to that document and you have to recreate it.
Subject: RE: Embeded View
Or, if you only have one Property document for each address, and an inspection document must be tied to a property document, you could make the inspection form a response document.
Your embedded view would then contain only inspection docs (do not show responses in hierarchy), and the categorized, hidden column in the view would be $REF. You then use @Text(@DocumentUniqueID) in your Single Catgory.
I know the previous response states that you shouldn’t use the UNID, but this is really what response documents are designed to do - be connected to their parent by the parent’s unique ID. Seems like reinventing the wheel to not use the built-in functionality.
That said, if there are multiple property documents for each address, and you still want the inspection to be related to the address and not the individual property document, you will have to go with a computed key rather than UNID.
Subject: RE: Embeded View
By using the UNID (and this is important), you get hosed if you have to recreate the document. Yes built in functionality is usually the best way to go, but sometimes you have to decide how much risk you are willing to take. That is why I prefer a different key than the UNID.
Subject: RE: Embeded View
Ok,I’ve created a view with a colulmn catagorized based on the “address” field of the child document named “test”.
The parent document key field is “address”
What do I need to put in the “Show single catagory” section of the embeded veiw to get only those documents that match up with the parrent?
I’m not using response documents.
thanks for your help in addvance.
Jim Lamb
Real Estate Depot
Subject: RE: Embeded View
“address” (without the quotes). If you want your single category to computed off of a field on the form, the single category formula is just the field name.