getPanelId Problem

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

getPanelId Problem

Post by customaware »

I guess I cannot see the wood for the trees but can anyone point to any possible syntax error with the line below?

The Process VIEWAsset fies no problem but I get no output in the DetailDisplay panel.

<a href="#" onclick="AwareApp.startProcess (`VIEWAsset`, AwareApp.getPanelId('Main','Assets2','DetailDisplay'))"><i class="fa fa-search fa-lg"></i> DETAIL</a>
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: getPanelId Problem

Post by pureist »

AwareApp.startProcess('VIEWAsset', AwareApp.getPanelId('main','Assets2','DetailDisplay'))
customaware
Posts: 2392
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: getPanelId Problem

Post by customaware »

Thanx Matthew but No Cigar.
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: getPanelId Problem

Post by pureist »

I remember the frame type (ie. 'main') had to be lower case, but I thought the tab and panel names didn't have to be.
Maybe they do?
And I'm sure it wasn't necessary to have a space before the opening bracket, but maybe that has changed?
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: getPanelId Problem

Post by tford »

Hi Mark,

Are you sure the issue is with the getPanelIId part?

This is a working link I use:
<a href="#" onclick="AwareApp.startProcess ('Totals__Filters_Clear','main')" title="Click to set filters to: All" ><<LoggedInRegularUser.Selected_Filter>></a>
Note that 'Totals__Filters_Clear' uses ' while your parameter `VIEWAsset` uses `
<a href="#" onclick="AwareApp.startProcess (`VIEWAsset`, AwareApp.getPanelId('Main','Assets2','DetailDisplay'))"><i class="fa fa-search fa-lg"></i> DETAIL</a>
Not sure if that makes a difference.
Tom - V8.8 build 3137 - MySql / PostGres
customaware
Posts: 2392
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: getPanelId Problem

Post by customaware »

Once again Awaresoft's over the top and totally bloody Awaresome support has shone through....

The issue is that I was doing this from a DISPLAY LAYOUT and apparently getPanelId does not currently work from a DISPLAY LAYOUT.

However, add this to it's own .js file in Custom/JS

function spr_getLayoutPanelId (frameType, tabName, panelName)
{
var t = AwareApp.getPanelId(frameType, tabName, panelName);
var s = "[id*='" + t + "']";
var p = $("#aware_app").find (s);
return p.attr("id");
};

and change the call from AwareApp.getPanelId(frameType, tabName, panelName) to just spr_getLayoutPanelId (frameType, tabName, panelName)

and it works.

Hopefully we might this little snippet of Gold in a future build. ;-)

Awaresoft positively redefining the meaning of Support.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: getPanelId Problem

Post by aware_support »

In the new build there will be a function AwareApp.getLayoutPanelId(frameName, tabName, panelName)

This function should be used if a panel belongs to a visual perspective displayed using the DISPLAY LAYOUT action.
Aware IM Support Team
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: getPanelId Problem

Post by cishpix »

aware_support wrote:In the new build there will be a function AwareApp.getLayoutPanelId(frameName, tabName, panelName)
@Support, I search the function in UserGuide but didn't found it.
Is the function still available in the latest version?

I try take some HTML script that call AwareApp.getPanelId from IssueResolution sample in my learning but it didn't works but the script from @Mark is works (thanks for you Mark)
Regards,

Suwandy
-----------------
Kisaran - Indonesia
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: getPanelId Problem

Post by aware_support »

The function should still be there, the documentation may not have been updated.
Aware IM Support Team
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: getPanelId Problem

Post by cishpix »

aware_support wrote:The function should still be there
@Support, I have tried it with the below code but unfortunately it didn't works

Code: Select all

<a href="#" onclick="AwareApp.runQuery('Issue - open', AwareApp.getLayoutPanelId('main','Issues','Output Layout'));">
Maybe I don't know how to use it.
Regards,

Suwandy
-----------------
Kisaran - Indonesia
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: getPanelId Problem

Post by Jaymer »

just for confirmation, thats identical (syntactically) to what I use in the std. getPanel

onclick="AwareApp.startProcess ('Toggle_TL_FindAll',AwareApp.getPanelId('main','R3 CRM','Panel2') );"

Check the Browser Console (via Inspect) for an error msg

OR - try calling a Query that doesn't have a space in the name (I know that shouldn't matter, but you never know!)
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
Post Reply