Can not use JavaScript Library funcion in RPE template
Hello!
Sorry, but I have a strange problem with JS library function. I'm doing everything like to:
But when I want use the function in a text element in the template, I'm getting a reference error:
May be somebody knows why it happens. Help me please if possible!
Thank you!
|
Accepted answer
This is a design limitation in RPE. A library script cannot use variables or data properties. If so, RPE will not use the script as library.
Dmitry A. Lesin selected this answer as the correct answer
Comments
Kumaraswamy Gowda
commented Aug 08 '18, 12:12 a.m.
Yes Prasad, it is the limitation.
Dmitry A. Lesin
commented Aug 10 '18, 8:14 a.m.
Yes, thanks
I checked the same, and it's correct. And even, try...catch block isn't required if any variables are excuded because there's no error.
|
2 other answers
Did you check the "library script" property?
Comments
Dmitry A. Lesin
commented Aug 07 '18, 10:40 a.m.
Yes, exactly!
And I can find and insert this function in another element by CTRL-SPACE.
Dmitry A. Lesin
commented Aug 07 '18, 10:41 a.m.
I'm working with RPE v6.0.5!
Dmitry A. Lesin
commented Aug 07 '18, 12:31 p.m.
But I found that it catches an error that "displayAllTCNames" is not defined when I try to use it. It's strange, may be there's a bug in RPE because I can not use it in the same template, isn't there?
Thank you
|
Could you try this in the text element?
try{ displayAllTCNames() } catch(e){ //catch and just suppress error } Comments
Dmitry A. Lesin
commented Aug 07 '18, 10:49 a.m.
Cool! You are genius.
Thank you very much!
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.