Is this possible

Guys, Is this possible and if so what is the easiest way of doing it

I want to have a system which manages property and to try an explain what i want to do I will number it

Form 1

Property details with various elements
Form 2

Tenants details with various elements
Form 3

Maintenance contractors details with various elements
Let say I have a property that I want to let out. I input all the details using form 1.

I then find a tenant and put their details in using form 2. I want to link the tenant to the property that I put in using form 1. Is this possible?

I then want to create a maintenance list that I link to the property. So for example I create form 3 with the contact details of contractors. I then create a maintenance record for the property "joining" form 3

So in effect

1. Form one is the used as the main form
2. Forms 2 + 3 are linked to form 1

I hope this makes sense. Is it possible?

Thanks
 
I want to link the tenant to the property that I put in using form 1. Is this possible?
Yes, you would use a redirect plugin, with a placeholder in the querystring, something like:

?tennant___property={property___id}

I then want to create a maintenance list that I link to the property. So for example I create form 3 with the contact details of contractors. I then create a maintenance record for the property "joining" form 3
Sounds like you may have 2 forms here, contractors and maintenance reports?
I guess what you want linked to the property is the maintenance report, so ensure that it has a database join element pointing to the property list, then in the property list in the related data section you should enable the related data options for the maintenace list. This adds links to the property list where you can add or view related maintenance reports
 
What about this?

Is there a way to filter a db join that is connected to the tenant list to display only those records added by me? I could have this on the property form when adding/editing a property. I tried with my filter already in place but it displays all the records

So if I can filter the db join element on the property form could I then have a link on the list view to the tenants record?

Thanks
 
By "filter a db join" so you mean filtering the dropdown list of choices?

If so, yes. In the join's WHERE filter, put something like ...

WHERE {thistable}.userid = {$my->id}

Leave {thistable} as-is, change userid to the element name on the table you are joining which holds the user ID.

Can't remember if you need to put the WHERE or not, the tooltip should tell you.

-- hugh
 
Thanks Hugh that works perfectly :)

I know you are probably asleep now so can anyone else tell me please how to add a link to the list view that takes me to the tenants record?

Thanks

Mark
 
Without knowing your exact setup, I can't give exact details.

Best route is probably to use a detail link on an element, which points to the relevant form, and uses a placeholder for the tenant ID (i.e. the PK of the tenant table). So your link would include something like &rowid={tablename___tenant_id} or whatever the full element name of the element on the list you are showing that contains the tenant ID.

-- hugh
 
Folks I have tried what Hugh has suggested but I think I am missing something

To clarify what I have

I have a form that adds a property and that form id is 45. Within that form I have a db join that filters the tenants that belong to me.

I choose the tenant and it is shown on the list view - the property list id is 41. The db join element is called properties___property_list_tenant.

The id for the table where the tenant is stored is 41, it is called tenants_reg and the PK is id.

In the db join element for the tenant, i put the following in the custom link field

index.php?option=com_fabrik&view=details&formid=41&rowid={tenants_reg___properties___property_list_tenant}

This is the bit I think is wrong - Whe i view the property list and hover over the tenant link, it shows the following with no id to display

index.php?option=com_fabrik&view=details&formid=41&rowid=

Can someone please tell me what the placeholder should be?

Thanks
 
I have read through this several times and am still confused. :( So you want the db join element in your property list to link to a detail view of the tenant?

If so, I think you need this in your custom link field

index.php?option=com_fabrik&view=details&formid=X&rowid={properties___property_list_tenant}

Where X is the id of your tenant form. You may need to use {properties___property_list_tenant_raw} instead to get the actual id value, I can't remember. BTW there should be no spaces (sometimes this forum will insert spaces).

As more explanation of the URL:

&view=details => Shows a detail view (read only)
&rowid=Y => of record id Y in the list that
&formid=X => form X reports to

Using your db join element as the placeholder will fill in the id for the selected tenant.
 
Thanks rackem i have done this and it works great - What I did have to do was to select the PK as the value - it maybe that I didn't have to but I was getting so fed up with it trying to get it work i started a fresh list and it now works great

PS: You understood perfectly and jfQuestiaux also gave me some help - I am grateful to you both

I can now move on and get this system built!

Another gold medal for Team Fabrik!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top