Post

4 followers Follow
0
Avatar

Use variables in scripts in custom panels

Hi,

 

I'm trying to build a custom panel that uses the API to do a query related to the selected item in screen, but the documentation doesn't really explain how to use the "advanced" section of the custom panels definition. I need to get the id of the parent project of the selected task and then do a query with this value. However, I'm not able to put this id as a javascript variable to properly build the query. If I use the HTML section and put a "<script>" tag it gets removed by Clarizen when the panel is rendered. In the script section I cannot use Clarizen variables or formulas. And finally in the data section (JSON format) it says I can use variables or formulas but they don't actually get evaluated when the page is rendered. I don't even know how it is possible to mix curly brackets from the JSON objects and the Clarizen formulas and still make sense of it. Can you please help me?

 

Thanks in advance.

Fernando Borrego Polo Answered

Official comment

Avatar

Andrew,

I have received confirmation that the document is still relevant but I can only attach images within these posts. Please provide me your email so that I can send you the file. It will be named 'Custom Panels Kit.pdf'.

Thank you

Boris Krutiy
Comment actions Permalink

Please sign in to leave a comment.

8 comments

0
Avatar

Hi Fernando,

 

I'm attaching the Custom Panel kit. I believe you can leverage some of the examples there in order to nail your use case.

Please feel free to chime in if you still unable to get this to work.

 

Good luck!

Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

Andrew, 

I was able to find the document you are looking for but the document is from Oct-2014 so I need to verify that it is not obsolete with Product before providing you information that will not help you. 

I will update as soon as I receive more information.

Boris Krutiy 0 votes
Comment actions Permalink
0
Avatar

Andrew, 

Please disregard my last message. Do not provide your email. I was able to find yours. 

Boris Krutiy 0 votes
Comment actions Permalink
0
Avatar

Any chance this document is posted as a resource anywhere in clarizen success? 

Brunswick Lowe 0 votes
Comment actions Permalink
0
Avatar

Boris, Tamir, is this kit available somewhere that I can access it? I think it'd be helpful for a tricky one I'm trying to solve. 

Brunswick Lowe 0 votes
Comment actions Permalink