Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript error when referring to tokens in table component

Highlighted
Vinod Jadhav
Regular Collector

Javascript error when referring to tokens in table component

Hi,

We have one table component on the form and we have one field with autocomplete list validation in the table component. The auto complete list is pulling some values based on request status so we have referred [REQ.REQUEST_ID] token the query. Now when we try to click on auto complete list on the form through TC, it throws javascript error on the status bar of IE something like 'window.opener.document' is null or not an object'.

Any idea why this error message is coming? any clues to resolve this error message?

Any help is greatly appreciated!

Thanks
Vinod
10 REPLIES

Re: Javascript error when referring to tokens in table component

Hi,

was the request send?
With other words: Do the request have a request id when you try to execute the auto complete list?

Do the statement work when you run it with SQLRunner?

Can you attach the SQL Statement of the AutoComplete List?

Regards
Volker
Vinod Jadhav
Regular Collector

Re: Javascript error when referring to tokens in table component

Hi Volker,

Yes, it works fine when I execute it on the PL/SQL developer. This TC is visible on the form after request submission only. Hence request id is available.

Below is the query from TC auto complete list.
-----------------------
select environment_name,environment_name
from kenv_environments ke
where ke.enabled_flag = 'Y'
and ke.user_data2 in ('DEVELOPMENT','TESTING','QUALITY_ASSURANCE','PRODUCTION')
and ke.user_data2 =
(select decode(ks.status_name,'Confirm Promotion to DEV instance','DEVELOPMENT',
'Confirm promotion to SI TEST instance','TESTING',
'Pending Review for QA Release','QUALITY_ASSURANCE',
'Pending Review for Prod Release','PRODUCTION',
'Patch Testing - Functional Validation Pending','TESTING',
'Patch Testing - Technical Validation Pending','DEVELOPMENT',
'Patch Testing - Technical and Functional Validation Pending','QUALITY_ASSURANCE',
'Code Testing - Functional Validation Pending','TESTING',
'Code Testing - Technical Validation Pending','DEVELOPMENT',
'Code Testing - Technical and Functional Validation Pending','QUALITY_ASSURANCE', ke.user_data2)
from kcrt_requests kr,
kcrt_Statuses ks
where kr.status_id = ks.status_id
and kr.request_id=[REQ.REQUEST_ID]
)and upper(environment_name) like upper('?%')
order by 2

-------------------

We are referring to Request id as [REQ.REQUEST_ID] in the table component.

Please help.

Thanks,
Vinod

Re: Javascript error when referring to tokens in table component

Hi,

is the error message displayed just after opening the "Add" dialog or after clicking the Auto Complete button?
Are there any rules or default values for fields configured in the TC?

What happens when the auto complete list filed is not included in the TC?

Auto Complete Lists with [REQ.REQUEST_ID] included are working fine within TC on my ppm box.

Regards
Volker


Re: Javascript error when referring to tokens in table component

After a closer look to your attachment I have seen something....

The TC window have a address bar.
Normaly the window do not have a address bar.
What happens to the "ppm" window?

The message window.opener.document is null sounds like the parent object of the TC window is not available.

However:
[REQ.REQUEST_ID] do work on Auto Complete Lists in TC's.

Your Problem can be related to browser configuration something like popup blocker...

Regards
Volker

Jim Esler
Honored Contributor

Re: Javascript error when referring to tokens in table component

Keep in mind that the request id does not exist until the request is submitted.
Vinod Jadhav
Regular Collector

Re: Javascript error when referring to tokens in table component

I am using IE6 SP3.

This below query works in the Auto complete list of request form itself. But if I try to pull DBA names from specific groups based on request percent complete for specific request id, it start giving same javascript error. Request is created and has passed couple of steps as well.

select distinct ku.username,ku.full_name,ku.email_address
from knta_users ku,
knta_security_groups ksg,
knta_user_security kus
where ku.user_id = kus.user_id
and kus.security_group_id = ksg.security_group_id
and ksg.security_group_name in ('ICC DBA Admin Group','SI DBA Admin Group' )
and (upper(ku.full_name) like upper('?%')
or upper(ku.username) like upper('?%')
or upper(ku.first_name) like upper('?%')
or upper(ku.last_name) like upper('?%'))

--------------------

Below query is giving problem.

select distinct ku.username,ku.full_name,ku.email_address
from knta_users ku,
knta_security_groups ksg,
knta_user_security kus
where ku.user_id = kus.user_id
and kus.security_group_id = ksg.security_group_id
and ksg.security_group_name = (select case when percent_complete <= 70 then 'ICC DBA Admin Group' when percent_complete <= 70 then 'SI DBA Admin Group' end from kcrt_requests where request_id = [REQ.REUQEST_ID])
and (upper(ku.full_name) like upper('%')
or upper(ku.username) like upper('%')
or upper(ku.first_name) like upper('%')
or upper(ku.last_name) like upper('%'))

---------------------

I have check pop up blocker and its fine.

Any other clues? Please help.

Thanks
Vinod


Jim Esler
Honored Contributor

Re: Javascript error when referring to tokens in table component

Your query includes the text ' [REQ.REUQEST_ID]'. Is this actually in the query you are issuing or is it a transcription error when entering your reply on this thread?
Vinod Jadhav
Regular Collector

Re: Javascript error when referring to tokens in table component

Hi Jim,

I have entered the correct token [REQ.REQUEST_ID] in the auto complete list query. It was typo while putting that query on the forum.

Below is the exact query I am using -
select distinct ku.username,ku.full_name,ku.email_address
from knta_users ku,
knta_security_groups ksg,
knta_user_security kus
where ku.user_id = kus.user_id
and kus.security_group_id = ksg.security_group_id
and ksg.security_group_name = (select case when percent_complete <= 70 then 'ICC DBA Admin Group'
when percent_complete > 70 then 'SI DBA Admin Group' end
from kcrt_requests where request_id = [REQ.REQUEST_ID])
and (upper(ku.full_name) like upper('%')
or upper(ku.username) like upper('%')
or upper(ku.first_name) like upper('%')
or upper(ku.last_name) like upper('%'))


Please advise.

Thanks
Vinod
Jim Esler
Honored Contributor

Re: Javascript error when referring to tokens in table component

Another anomaly in the query you are showing: the failing query is using "upper('%')" instead of "upper('?%')"
Vinod Jadhav
Regular Collector

Re: Javascript error when referring to tokens in table component

Thank you Jim for your kind reply.

After correcting it as well, its not working. I am getting "javascript.noop" error on the status bar of IE window.

Can you think of anything else? like Internet Explorer problem? I have seen tokens working in auto complete list validations. Not sure why its not working this time? Ideally it should throw some kind of nice error but unforntunately its not doing that.

Please help. This is becoming critical issue for us.

I had raised ticket in HP Support as well and they are telling me "We do not support customization". I do not understand what kind of customization they are talking about.

Thanks
Vinod
//Add this to "OnDomLoad" event