Contains tips for configurators working with Aware IM
#44441 by PointsWell
Thu Aug 17, 2017 3:32 am
So this is an alternative to a suggestion that was provided to me in another thread which if I can find I will cross link.

I had a challenge in a VP whereby I wanted a three panel screen:
Left full length panel showing a query of all Contacts
Right Top showing the Master
Right bottom showing various views of child objects.

My challenge was that Contacts Type: Company and Contacts Type: Person have different child relationships and I wanted to keep the Right Bottom context correct all the time.

One option is to use a blank HTML panel as per pureist and BLOMASKY and then attach a refresh process to that.

I realised however that this resulted in the user being presented with a blank lower screen until they made a selection.

My work around was to add a variety of Operations to the bottom tool bar for the Master to open a variety of Queries in the bottom panel. The operations are visible based on Contact Type

For each of the Query views that are shown in the bottom panel I then had an Auto Refresh to ensure that the Query was always in the Context of the currently selected Contact. I set the refresh to be executed by a process and then within that process I checked the Contact type and the relevance of the view to that Contact for example:
If the Contact is not of Type Company and View= Employees then Change view to ContactAddresses given that Employees are attributes of Companies not People.

Whilst this seems like a longer way round than just using the refresh on HTML, it actually becomes easier because:
1 - there is only one refresh process running ever - whereas with the HTML method there are two, one to update the Query context and one to check the View
2 - the HMTL refresh process was becoming more and more unwieldy to manage.
3 - I no longer have to keep track of the last view selected
4 - I can set a default View to open when the page loads initially.

I realise this is probably teaching your granny to suck eggs for those longer in the tooth, but I thought it may help someone new.

Tags for this:
Visual Perspectives
Update Panel
Auto Refresh
Query
#44442 by eagles9999
Thu Aug 17, 2017 5:12 am
Can you post a small demo bsv please?
#44443 by PointsWell
Thu Aug 17, 2017 5:13 am
eagles9999 wrote:Can you post a small demo bsv please?


Will do once I have some time. My model is now quite big so faster to just build a new one.
#44444 by PointsWell
Thu Aug 17, 2017 8:32 am
Put the BSV into Test

Press the Populate Data Button

Refresh the browser page - the grid won't auto refresh with no records.

Select Big Co - then Show Factories
Then select Barbara - Factories grid changes to Addresses
Attachments
(41.45 KiB) Downloaded 346 times
#44445 by eagles9999
Thu Aug 17, 2017 9:57 am
Thanx...

Will have a look. Always interesting to see how others construct VPs
#45076 by rbross
Thu Oct 05, 2017 12:03 am
Nice! thanks for sharing
#45080 by rbross
Thu Oct 05, 2017 1:44 pm
So in your demo, your address view is not linked to a person or company, it is showing all addresses.
What method are you using to show only the addresses for a person or company?
Are you running a process when a Contact is selected and updating a field in RegularUser BO and using it the Where clause of the query for addresses, WHERE Address.Contact=LIRU.SelectedContact or using "This"
WHERE Address.Contact=ThisContact
I Know in some cases "This" does not work and you need to use the selected field that has been updated and stored in the RegularUser BO.
#45084 by PointsWell
Thu Oct 05, 2017 8:18 pm
Hi, the bsv was really just a quick and dirty to demonstrate the switching, so the Address query should have a filter of

Code: Select allFIND Contact WHERE Contact=LIRU.Contact


There is probably A missing refresh on the Address view as well.

My understanding of This is to use it only when there is some ambiguity as to which Contact record you were referring to (I.e. you had brought a second or more Contact into Context)
#45085 by rbross
Thu Oct 05, 2017 8:22 pm
I thought so, thanks for clarifying that.
I found that using "This" can be used in most where clauses but in VP's many times you have to use the LIRU attribute that was updated when the Parent record was selected.

Just a side note, calling a process to update the LIRU attribute with the selected record in a query does not work when you have "Allow Inline Edit: turned on.
#45086 by rbross
Thu Oct 05, 2017 8:27 pm
If you could, what are your thoughts on this post: https://www.awareim.com/forum/viewtopic ... 075#p45075
I started planning the layout just as I saw your post on Refreshing Panels in VP.
Any input would be most appreciated.
#45092 by Jaymer
Fri Oct 06, 2017 2:05 am
Sean, so are there 2 changes that need to be done to the BSV (address Query & address View), or have you updated it?
#45093 by PointsWell
Fri Oct 06, 2017 2:11 am
Jaymer wrote:Sean, so are there 2 changes that need to be done to the BSV (address Query & address View), or have you updated it?


Don't really have time at the moment to make an update. It was posted to demonstrate a particular principle, ie restricting access to and refreshing panels based on a parent BO's attributes which it does.

Hopefully the concept of a query filtered off the LIRU is an understood one.
#45094 by rbross
Fri Oct 06, 2017 2:15 am
PointsWell wrote:Hi, the bsv was really just a quick and dirty to demonstrate the switching, so the Address query should have a filter of

Code: Select allFIND Contact WHERE Contact=LIRU.Contact


There is probably A missing refresh on the Address view as well.

My understanding of This is to use it only when there is some ambiguity as to which Contact record you were referring to (I.e. you had brought a second or more Contact into Context)


Jaymer, see his comments above, there are some references missing, but an attribute in LIRU is what is used to filter on the address or any other views that are related to the contact or company selected.

Who is online

Users browsing this forum: No registered users and 3 guests