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
Refresh Panels in VP
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Refresh Panels in VP
Can you post a small demo bsv please?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Refresh Panels in VP
Will do once I have some time. My model is now quite big so faster to just build a new one.eagles9999 wrote:Can you post a small demo bsv please?
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Refresh Panels in VP
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
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
-
- QueryPanelRefresh.bsv.zip
- (41.45 KiB) Downloaded 907 times
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Refresh Panels in VP
Thanx...
Will have a look. Always interesting to see how others construct VPs
Will have a look. Always interesting to see how others construct VPs
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: Refresh Panels in VP
Nice! thanks for sharing
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: Refresh Panels in VP
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.
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.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Refresh Panels in VP
Hi, the bsv was really just a quick and dirty to demonstrate the switching, so the Address query should have a filter of
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)
Code: Select all
FIND Contact WHERE Contact=LIRU.Contact
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)
Re: Refresh Panels in VP
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.
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.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: Refresh Panels in VP
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.
I started planning the layout just as I saw your post on Refreshing Panels in VP.
Any input would be most appreciated.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: Refresh Panels in VP
Sean, so are there 2 changes that need to be done to the BSV (address Query & address View), or have you updated it?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Refresh Panels in VP
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.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?
Hopefully the concept of a query filtered off the LIRU is an understood one.
Re: Refresh Panels in VP
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.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
There is probably A missing refresh on the Address view as well.Code: Select all
FIND Contact WHERE Contact=LIRU.Contact
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)
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~