Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Adding additional data thru Fetch()
smartraja
Find more posts tagged with
Comments
kclark
Can you attach the data for "Data Source" please?
smartraja
Dear KClark,
Please find the data file I used for this report.
its the data in Sheet1
disclosure section
test 1 main
test 2 main
test 3 main
test 4 main
test 5 main
test 6 main
test 7 main
test m1 main1
test m2 main1
test m3 main1
test m4 main1
test m5 main1
Basically my requirement is , I need to insert 1 row of data other then the input fetched from the XL. I have 2 columns, so whenever the Section name changes, i'll insert a row of data and then the current row which was fetched.
something like, when "test m1" ,"main1" is fetched, my scripted DS's output should be "Header","Main1"==>INSERTED DATA and the next row as "test m1","main1". I will write this logic later. Right now when I try to insert something into the row["discl"]/row["inRow"] array, it just overwrites insert of appending. pls help me out.
smartraja
Hi Guys,
Could someone please help me with this, I would like to add an additional row of data when a specific record is fetched from the input.
eg:
if input is
field1,field2
1,A
2,B
3,C
4,D
5,E
i would like to write a condition in Fetch() to create a scripted dataset output as shown below
if field1 = 3
{insert fieldout1 = 6,fieldout2=F;
fieldout1 = field1 data,fieldout2= field2 data;
}
else
{
fieldout1 = field1 data,fieldout2= field2 data;
}
so the output should be
fieldout1,fieldout2
1,A,
2,B
6,F <= INSERTED DATA
3,C
4,D
5,E
But this is not working properly, when i do row["field1out"] = '6' , its just overiding the data,not adding to the array.