Refresh Query Panel Operation Buttons

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2392
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Refresh Query Panel Operation Buttons

Post by customaware »

I have a Query that has two buttons. Each toggle a value in LIRU on or off.
Each Button have display condition depending on the value in LIRU.

The Query is refreshed each time the Toggle Process is called. That is fiine. BUT, the refresh does not refresh the button conditions and hence the visible button does not change.

Anyone know how to force the Query Refresh to also refresh Panel Operation Buttons?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
UnionSystems
Posts: 197
Joined: Fri Jun 17, 2016 7:10 am
Location: Brisbane Australia
Contact:

Re: Refresh Query Panel Operation Buttons

Post by UnionSystems »

Hi Mark,

What we do is display the toggle value from LIRU in the actual button title and only have one button. Only pain is that the displayed value needs to be opposite to its effect. So say the objective it to show or hide a column in the Query, then the LIRU value can be either SHOW or HIDE. So when the column is hidden the LIRU value is actually SHOW so the button, using <<bo.attribute>> displays “SHOW COLUMN” When you click the button it calls a process that swaps the LIRU value to HIDE and then the button displays “HIDE COLUMN”.
AWS Linux, Windows Server, AIM 8.4 & 8.6
customaware
Posts: 2392
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Refresh Query Panel Operation Buttons

Post by customaware »

I have already tried that Dave....
This process, stuffs a string for the button in LIRU

Code: Select all

IF
LoggedInMAMUser.HideChildAssets='Yes'
THEN 
LoggedInMAMUser.HideChildAssets='No'
LoggedInMAMUser.ToggleButtonText='<i class='+SystemSettings.DQ+'fas fa-eye-slash redbutton'+SystemSettings.DQ+'></i><span class='+SystemSettings.DQ+'redbutton'+SystemSettings.DQ+'>Hide Child Assets</span>'
ELSE
LoggedInMAMUser.HideChildAssets='Yes'
LoggedInMAMUser.ToggleButtonText='<i class='+SystemSettings.DQ+'fas fa-eye greenbutton'+SystemSettings.DQ+'></i><span class='+SystemSettings.DQ+'greenbutton'+SystemSettings.DQ+'>Show Child Assets</span>'
But the button still will not refresh when the Query Refreshes.
If I reload the entire page then the right button text is displayed so I know it is updating properly.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Refresh Query Panel Operation Buttons

Post by hpl123 »

If you refresh the query with a process all things including buttons are updated or did I misunderstand/read to quickly the Q? Another alternative is to use a jQuery function to do whatever you need to do.
Henrik (V8 Developer Ed. - Windows)
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Refresh Query Panel Operation Buttons

Post by tford »

Not a solution for your query, Mark, but could you place a form in the VP on top of the query? The form could easily refresh w/ the process.
Tom - V8.8 build 3137 - MySql / PostGres
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Refresh Query Panel Operation Buttons

Post by Jaymer »

Don’t use panel operations and put the buttons in a custom header
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
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Refresh Query Panel Operation Buttons

Post by aware_support »

Henrik's suggestion is the correct one - by default Aware IM only refreshes the data. So you need to write a process that re-displays the query:
DISPLAY QueryName

and then set this process as auto-refresh implementation
Aware IM Support Team
customaware
Posts: 2392
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Refresh Query Panel Operation Buttons

Post by customaware »

Yep... That works.... Thanx Support
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Post Reply