Regarding Collection based Report

269 views
Skip to first unread message

priyanka....@flowian.com

unread,
Mar 30, 2015, 3:46:17 AM3/30/15
to suppor...@runmyprocess.com
Hello Team,

I am using collection based report in which one column "X" whose value is depending on the other column "Y".

In Column "X", I am using script to decide the value depending on the value of "Y" column.(using javascript if loop)

But When I refer to value of column "Y" using "[[property_name]]" (which is the property name in the collection for that report column) in the script of column "X", there is an error saying that the variable is "undefined".

My question is How can we access the value of any column in any other column's script region?

Regards,
Priyanka

Pankaj Kumar

unread,
Mar 30, 2015, 5:14:17 AM3/30/15
to suppor...@runmyprocess.com, Priyanka Patgaokar
Hi Priyanka,

I guess you are using collection in Report Widget, is this correct?

You can access the collection value using the "[[property_name]]" in the report. Please write your js code in the highlighted icon of the "configure column" in the report. Below is the screen shot.

i.e. if collection has two properties "firstname" and "lastname" and you want to show the full name in a single column, you can use 

"[[firstname]]" + " " +"[[lastname]]" 

If I misunderstand your problem, please describe more the scenario you are trying to implementing, if possible attach the screen shot. 

Inline image 1


Thanks,
Pankaj Kumar




--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, 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/5804a9c0-9d28-4ca7-a8d1-8b10beac9fa0%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

priyanka....@flowian.com

unread,
Mar 30, 2015, 6:41:47 AM3/30/15
to suppor...@runmyprocess.com, priyanka....@flowian.com
Hi Pankaj,

Yes you are right that I am using collection report.

And as per your advice I am using the "[[property_name]]" in the script of that column.

here is the sample code in the JS section of my report column.


if("[[Duplicate_Check]]"=="Duplicate")
{

}

then my report column is showing value as "undefined" in my reports.

But in my report the "Duplicate_Check" column showing values.

Could you please suggest.

Regards,
Priyanka


Pankaj Kumar

unread,
Mar 30, 2015, 7:29:56 AM3/30/15
to suppor...@runmyprocess.com, Priyanka Patgaokar
Hi Priyanka,

For writing the if condition in the report column, you need to modify the code a little:-

code:-

// use a variable for if condition as in if condition this is treated as plain string rather than accessing the calue
var colValue = "[[Duplicate_Check]]";
var columnValue = "";

if(colValue == "Duplicate")
{
columnValue = ""
}else{
columnValue  = colValue 

}
columnValue;


Please try this code, when if condition is true, report column will be blank otherwise it will show the colValue. You can modify your if condition as per your business logic.

Thanks,
Pankaj Kumar






Regards,
Priyanka


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, 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/.

priyanka....@flowian.com

unread,
Mar 31, 2015, 1:48:13 AM3/31/15
to suppor...@runmyprocess.com, priyanka....@flowian.com
Hello Pankaj,

Thank you for your reply.

I am trying for below code.

var colValue = "[[Duplicate_Check]]";
var columnValue = "";

if(colValue == "Duplicate")
{
columnValue = "Duplicate"
}
else
{
columnValue = "Original"
}


But it showing "Original" in that column of the Report.

It always goes in else part. because the value of [[Duplicate_Check]] is undefined.

I am not getting why its showing value as undefined when i am accessing it.

Regards,
Priyanka.


Pankaj Kumar

unread,
Mar 31, 2015, 2:40:31 AM3/31/15
to suppor...@runmyprocess.com, Priyanka Patgaokar
Hi Priyanka,

Please confirm in the collection "Duplicate_Check" has been defined as property and contain some values as "colValue" should not be undefined.

var colValue = "[[Duplicate_Check]]";
colValue;

Please use this code in the report if its showing values of the collection property "Duplicate_Check", the code should run fine, or you can try this code accessing some other property of the collection for the testing.

This code is running fine in my report, I guess its related to accessing the value of "Duplicate_Check" of collection.

Thanks,
Pankaj Kumar


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, 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/.

priyanka....@flowian.com

unread,
Mar 31, 2015, 6:09:15 AM3/31/15
to suppor...@runmyprocess.com, priyanka....@flowian.com
Hi Pankaj,

I have tried the code you have given and it is working fine with the other collection reports.

But don't know what is the problem. But the Collection reports shows me all the values in columns of the report. But when I try to access those values using the same property name, it shows as undefined.

Regards,
Priyanka

Pankaj Kumar

unread,
Apr 1, 2015, 5:05:44 AM4/1/15
to Priyanka Patgaokar, suppor...@runmyprocess.com
Hi Priyanka,

Are you able to resolved the issue by the code provided, please confirm so that we can mark this as completed or we can have Screen sharing to see your code.

Thanks,
Pankaj Kumar

On Tue, Mar 31, 2015 at 5:24 PM, Pankaj Kumar <pku...@runmyprocess.com> wrote:
Hi Priyanka,

Is it possible for you to share the screen using Google Hangout, so that we can check the issue, if yes please suggest the suitable time for the same.

Thanks,
Pankaj Kumar



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, 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/.

Shobhit Tripathi

unread,
Apr 1, 2015, 3:06:30 PM4/1/15
to suppor...@runmyprocess.com
Hi Priyanka,

I think you are getting the value as undefined because you are using the JavaScript on the same record(report configuration) for fetching the records.

As you are using the "[[property_name]]" in that field, which will be referring the property name of existing(other) column name of the report. So you need to add another column with the same property name as collection having with visibility as hidden.

Like an example: As per your requirement you have two fields X(=price) and Y(=product). So you need to add three columns, first column as "product" and others are price where in the second column "price" as property name with unchecked the visible option and for third column(i.e. price) you need to add the JS which will takes the result of previous price records and gives you the proper result.

Please find the attached screen shot for better understanding.

Note: Make sure that you used proper column name and also unique property name in report configuration.

Hope this will helps you.




--
Thanks & Regards,
Shobhit
Fujitsu- RunMyProcess
report_cnfig.png

Pankaj Kumar

unread,
Apr 2, 2015, 4:36:36 AM4/2/15
to suppor...@runmyprocess.com, Priyanka Patgaokar
Hi Priyanka,

I am marking this issue resolved as it is resolved in the Hangout session with you.

Thanks,
Pankaj Kumar 

priyanka....@flowian.com

unread,
Apr 2, 2015, 6:02:33 AM4/2/15
to suppor...@runmyprocess.com, priyanka....@flowian.com
Hello Team,

Thank you so much for your support.

Regards,
Priyanka.

Reply all
Reply to author
Forward
0 new messages