[Solved] Changing Output in VP panel

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

Re: Changing Output in VP panel

Post by PointsWell »

Jaymer wrote:I need to go rewatch the VP video tutorial cause I'm kinda lost in that whole concept.
Personally I am utilising the VP to do two things.

I have a range of VP that act as context. My rationale for this is to provide simplicity in the screen and not having the user working back and forward on tabs.

I have then also set up a specific VP that is specific to an access level (Finance). Navigation to that Context is then limited on the button.

I would have just set up one Context for the different Roles and swapped using the DISPLAY VP command, but I have placed context specific buttons on the left screen menu, which would not work so well otherwise.
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Changing Output in VP panel

Post by PointsWell »

PointsWell wrote:
PointsWell wrote: Works perfectly now (screen sizing issues aside)
I spoke way too soon. I am back to the refresh issue.

The forms show everything as expected. But when the selected item on the list changes, the process needs to be refreshed.

Really what I need is some means of having the two panels listen for changes in the item selected and then update with the details (or some means of being able to output to two locations.

I haven't looked at the network impacts of what I am doing yet, but I get the feeling that it is not going to be great.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Changing Output in VP panel

Post by tford »

I spoke way too soon. I am back to the refresh issue.

The forms show everything as expected. But when the selected item on the list changes, the process needs to be refreshed.

Really what I need is some means of having the two panels listen for changes in the item selected and then update with the details (or some means of being able to output to two locations.
Hard to help with so few details. If you could post a small BSV with where you're stuck, it might be easier for someone to help.
Tom - V8.8 build 3137 - MySql / PostGres
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Changing Output in VP panel

Post by PointsWell »

So this image is what I am trying to describe

One BO - Contact
3 forms
1-Create
2-Header
3-Sub = has two panels, that each hide based on the value of Contact.Company (Y/N)

Image

Ideally it would be more efficient to run the display of the Header and Sub forms off the one query - but they don't reside in the same panel.

I cannot have one form with tabs at the bottom of it as the real use case creates additional complexities in the form display. The data model is not changeable.

Initially I thought to show different queries in the bottom panel and use a button to swap back and forward but that doesn't look to be very efficient and will generate a bunch of validations which will become cumbersome over time, so then I hit upon the fact that displaying a different version of the form would fix a lot of UX issues.

So I have gotten as far as it almost working

The challenge that I have come up against is that the Select First Record gets lost when the query refreshes

See attached BSV.
Attachments
170206DoubleFormV1_1.bsv.zip
(36.73 KiB) Downloaded 655 times
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

[SOLVED] Changing Output in VP panel

Post by PointsWell »

Thanks to BLOMASKY

This is a solution to the issue that I was having.

1) make the panel a static HTML panel
2) it cant be empty so put anything in the HTML.
3) Other options tab, select refresh
4) Select one (or multiple) conditions to trigger the refresh. In this case, every time I select a row, I would run a process "handleSelectedRecord" which, would save the record in LoggedInRegularUser
5) Check Use process for Refresh in the panel, and have the process you want to run be triggered there

This obviously means that there is a refresh and re-query going on. Haven't looked at the impact on the network calls but for my initial development this works.
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: [Solved] Changing Output in VP panel

Post by customaware »

Glad you solved it Sean.

For nice solutions like this it would be great if you could post a small demo that shows the solution.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: [Solved] Changing Output in VP panel

Post by PointsWell »

UPDATE - After working with this for a little while I decided that there was a better way to manage this viewtopic.php?p=44441#p44441


I can't take any of the credit it was BLOMASKY but here's a small model showing the workings

There is only one BO in use - Contact.
There are 3 forms:
Create - used to create the full details for the BO
Header Form - just has the Contact Name and a switch, which is for visual confirmation only.
Sub Form - contains 2 sections. One with the Person related fields, the other with the Company related fields.

1 Query with an action on selection to set the RegularUser.Con_ID field.

2 Processes
1 Sets the Selected Con_ID (Process SelectContact)
2 Searches for the Contact matching Con_ID and then View the Contact using the Subform.

VP has 3 panels
Main - shows list of Contacts from the L_AllContact query - default action to View form
Contact Header - shows the form from query in Main
Contact Sub - HTML section with nothing in it. On the Other Properties tab set Refresh Info as below

Image

When you change the selection it runs the process triggering the change.
Attachments
170209-DoubleFormV1-1.bsv.zip
(36.66 KiB) Downloaded 644 times
Last edited by PointsWell on Thu Aug 17, 2017 4:58 am, edited 3 times in total.
pureist
Posts: 427
Joined: Sun Jan 24, 2016 10:00 pm

Re: [Solved] Changing Output in VP panel

Post by pureist »

hahahahaha! R E A L L Y ?

I think you should instead do what I wrote on Sunday in Post 42345 (http://www.awareim.com/forum/viewtopic. ... 345#p42345):

"Set the PANEL to be a html panel whose refresh, is triggered by the process run via the button, and carried out by another process.

Check-out the 'Refresh...' setting at the bottom of the properties for content panels, I think on the second properties tab.

A limitation of this feature is an instance in context cannot be passed as input, however if need be you can save the instance to use as criteria in an attribute of RegularUser of SystemSettings, which the process that carries out the refresh can access."


Oh wait! that's EXACTLY the same as what you've only now got to!! You had the solution 4 days and many hours of work ago. Fancy that!!

Attention to detail (beyond merely reading posts in a forum properly) is a great thing I've learned. It can save you many hours of needless futile work and effort. :mrgreen:
PointsWell wrote:Thanks to BLOMASKY
This is a solution to the issue that I was having.
1) make the panel a static HTML panel
2) it cant be empty so put anything in the HTML.
3) Other options tab, select refresh
4) Select one (or multiple) conditions to trigger the refresh. In this case, every time I select a row, I would run a process "handleSelectedRecord" which, would save the record in LoggedInRegularUser
5) Check Use process for Refresh in the panel, and have the process you want to run be triggered there
This obviously means that there is a refresh and re-query going on. Haven't looked at the impact on the network calls but for my initial development this works.
Last edited by pureist on Thu Feb 09, 2017 5:34 am, edited 1 time in total.
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: [Solved] Changing Output in VP panel

Post by PointsWell »

pureist wrote:hahahahaha! R E A L L Y ?

I think you should instead do what I wrote on Sunday in Post 42345 (http://www.awareim.com/forum/viewtopic. ... 345#p42345):

"Set the PANEL to be a html panel whose refresh, is triggered by the process run via the button, and carried out by another process.

Check-out the 'Refresh...' setting at the bottom of the properties for content panels, I think on the second properties tab.

A limitation of this feature is an instance in context cannot be passed as input, however if need be you can save the instance to use as criteria in an attribute of RegularUser of SystemSettings, which the process that carries out the refresh can access."


Oh wait! that's exactly the same as what you've only now got to!! You had the solution 4 days and many hours of work ago. Fancy that!!

Attention to detail is a great thing I've learned. It can save you many hours of needless futile work. :mrgreen:
PointsWell wrote:Thanks to BLOMASKY
This is a solution to the issue that I was having.
1) make the panel a static HTML panel
2) it cant be empty so put anything in the HTML.
3) Other options tab, select refresh
4) Select one (or multiple) conditions to trigger the refresh. In this case, every time I select a row, I would run a process "handleSelectedRecord" which, would save the record in LoggedInRegularUser
5) Check Use process for Refresh in the panel, and have the process you want to run be triggered there
This obviously means that there is a refresh and re-query going on. Haven't looked at the impact on the network calls but for my initial development this works.
Sorry I obviously misunderstood your solution and you didn't explain that the HTML couldn't be blank. Apologies if I have offended you.
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: [Solved] Changing Output in VP panel

Post by customaware »

Don't apologise Sean.

We are here to help those learning every way we can.

Don't worry to much about Mathew.... I am sure his irritating and terse demeanour is not intentional. ;-)

He certainly is knowledge about the product and has some good ideas and is living proof of how quickly and broadly you can learn only from having a Trial License.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
pureist
Posts: 427
Joined: Sun Jan 24, 2016 10:00 pm

Re: [Solved] Changing Output in VP panel

Post by pureist »

Not offended. Forget apologizing.
I was enjoying the show, watching and wondering why time and effort was being wasted on exploring 'work-around' solutons needlessly to a functionality which is inbuilt.
It's always entertaining, whether it be my time (because I did something stupid) or someone elses being wasted only to ultimately realize.
And then when the solution/realization dawns it's like a climax to a joke.

It would be good to progress beyond having trialled Aware, though some 'behavior irregularities' need to resolve before that could happen. Still, we live in hope.
Last edited by pureist on Thu Feb 09, 2017 5:56 am, edited 1 time in total.
pureist
Posts: 427
Joined: Sun Jan 24, 2016 10:00 pm

Re: [Solved] Changing Output in VP panel

Post by pureist »

This posted separately to ensure it doesn't get missed in the wash.
You wrote, "the HTML cannnot be blank", which I assume refers to the HTML panel content in the running application to begin with (as this is what you would want), and not having no content in the HTML panel in the config tool.
The config tool prompts you anyway for some HTML to be entered, so no reason to mention it.

I didn't explain that the panel couldn't be blank to begin with, because it can be in the running application, which is the context in which the 'blank' requirement seems to be most relevant.

Put <div></div> in it and it will be overwritten with the first refresh, as you probably now know.
Post Reply