Report WIdget Column Script

159 views
Skip to first unread message

michael...@zodiac.com

unread,
Jan 14, 2015, 7:17:09 PM1/14/15
to suppor...@runmyprocess.com
Hello -

I am perplexed as to how to use the script editor when defining columns for the Report widget.

The window banner simply says "Script Edition". I've tried using the examples shown on this docs page:
http://docs.runmyprocess.com/User_Guide/Development_Environment/Toolbox/Web_Interfaces/Widget/Report_Widget
but I can't get any variable references in [[]] to work. The ${P_user.name} does work.

Is the scripting for Freemarker or JavaScript? If JavaScript, how do I script the output to the cell?

Most importantly, how do I reference the value that would be displayed in the column/row of the report? My goal is to reformat it from JSON to HTML.

Thank you for any assistance.

Michael


Bidisha Das

unread,
Jan 14, 2015, 10:44:39 PM1/14/15
to suppor...@runmyprocess.com
Hi Michael,
The scripting inside report widget is javascript.You can't use freemarker in it. Although you can use html in that.

For eg:If you want to create links for a particular action you can use: "<a href=\"#\" onClick=\"javascript:load_item(\'" + "[[car_id]]" + "\');\"><img src=\"https://rmp-public.s3.amazonaws.com/public/icons/n_edit.png\"></a>

or else if you want to insert a new field,you can use : "<input type='radiobutton' name ='radio'>"

You can refer to :http://docs.runmyprocess.com/Developer_Guide/Collection/Collections_BackOffice  for more clarification on report configuration using html.

Hope it helps


Thanks & Regards
Bidisha

Wagner, Michael

unread,
Jan 15, 2015, 12:39:11 PM1/15/15
to suppor...@runmyprocess.com
Hello Bidisha -

Thank you for the reply but unfortunately I cannot get "Script edition" to do anything useful.  It appears to be some kind of hybrid HTML/Javascript interpreter.

This is a row of data in my collection, "gpr":
[{"ID":"906186","EngCenter":"US","Purchasing":{"SA":["yoland...@abc.com"],"APAC":["chris...@abc.com"],"AMERICAS":["bryan...@abc.com","jena...@abc.com"]},"Production":{"SA":["peter...@abc.com"],"APAC":["chris...@abc.com"],"AMERICAS":["ken....@abc.com","mirna...@abc.com"]},"Engineering Lead":{"All":["dindo...@abc.com"]},"Quality":{"SA":["john...@abc.com"],"APAC":["gary...@abc.com"],"AMERICAS":["alber...@abc.com","david...@abc.com","marco...@abc.com","miria...@abc.com"],"FRANCE":["christi...@abc.com","sebasti...@abc.com"]},"Validator":{"All":["jonas...@abc.com"]},"Data Mgmt":{"AMERICAS":["sonia...@abc.com"]},"Key Engineers":{"All":["bill...@abc.com","doming...@abc.com","mark...@abc.com"]},"StatCodeCat":"E - Equipment","AME":{"All":["hari...@abc.com"]},"Product Managers":{"SA":["andre...@abc.com"],"APAC":["jonath...@abc.com"],"AMERICAS":["david...@abc.com","david...@abc.com","scott...@abc.com"],"FRANCE":["goery...@abc.com"]},"MFG Eng":{"APAC":["mark...@abc.com"],"AMERICAS":["scott...@abc.com"]},"Moderator":{"All":["mary...@abc.com"]},"Name":"Automation","Compliance":{"All":["shaje...@abc.com"]}}]

I'd like to have one column in my report that contains the "Quality" hash.  I can get the Quality hash to display as a JSON string in the report, but I'd like to reformat it into a table and I have Javascript to do that.  But 
1) how do I get the value of the Quality hash into the JS?
2) how do I "print" from Javascript (document.writeln() does not work) into the report cell?

Thank you for any assistance.

Michael

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/fyk0sy1Pj08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/CAMGV9zvYOcUe7y1TO9UVqOn8k%3D_NP9_kULVA2kK5sB-RBkBbvg%40mail.gmail.com.



--

Michael Wagner

PLM Systems Engineer

Zodiac Pool Systems, Inc.

2620 Commerce Way, Vista, CA 92081


Office:  760-599-9600 x3087 | Mobile: 760-473-8785

Email: michael...@zodiac.com

Zodiac_ABetterLife_Logo_sm.png

Bidisha Das

unread,
Jan 15, 2015, 2:23:56 PM1/15/15
to suppor...@runmyprocess.com
Hi,
You can dynamically create HTML table using Collection data.You can use html in javascript widget provided on Web Interface.You don't need to configure report widget for that.If you want,I can provide you sample code for binding collection JSON in a Html table.


Thanks & Regards
Bidisha
Reply all
Reply to author
Forward
0 new messages