How would I...

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

How would I...

Post by PointsWell »

I have a hierarchy of records:

Tenant om_Contacts om_BankAccounts
Tenant ps_RelatedContactRecord om_BankAccounts om_Statements

So the Tenant record has its own Contact Record and this Contact has Statements (via the Bank Account).

I need to create a Cashbook which is essentially just a running statement but has to be segregated by Bank Account and would look like this (more or less):
Screen Shot 2018-02-09 at 18.40.26.png
Screen Shot 2018-02-09 at 18.40.26.png (16.63 KiB) Viewed 4102 times
I can't use a query with a form for a variety of reasons.

My initial thoughts were to create a Visual Perspective with a panel that calls a process to display a non Persisted BO that has a PS relationship to the Tenant Bank Accounts. That works for 10 seconds and then the non persisted BO is trashed.

I then thought, well I could persist the BO and then realised that if multiple users were viewing the Cashbook then the value of this would be changing constantly (and there isn't any need to have this saved). Similarly I avoided using the Tenant.ps_Contact.om_BankAccount object as the selector as this is a Many list and the selection has to be One only.

I'm not entirely au fait with the HTML field generator so have steered clear of the HTML panel but I have a feeling that will be the only way to achieve this.
JonP
Posts: 287
Joined: Thu Feb 16, 2017 9:49 pm
Location: United States

Re: How would I...

Post by JonP »

I would add an attribute to the Contact BO, something like SelectedAccount. That would be a single reference to the BankAccounts BO, represented as a combo box with autosave checked. That goes in your upper left panel. Then I would have a rule that if SelectedAmount was changed, run XYZ process that populates the right panel with a form grid of statement lines related to that BankAccount.
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: How would I...

Post by PointsWell »

I've copped out and just used a standard query of the Contact_Bank WHERE Contact_Bank.ob_Contact = LIRU.ob_Tenant.ps_RelatedContact.

I will look at 'prettying' it up with a custom query later on.
Post Reply