cancel
Showing results for 
Search instead for 
Did you mean: 

Sap analytics cloud getresult

Anthony
Explorer
0 Kudos
260

Hello,

I have a first story with a hyperlink to another story passing doc number in parameter. In the target story, we have a table showing for a doc number a list of URL (pdf url for attached document) as follow :

Doc number Description URL

39288888     test1           URL1

39288888     test2           URL2

Is it possible to check if the table has one or more lines (URL) ? The idea would be that if the table has only one line (one url), then I open automatically the URL in another page.

thanks

Mat

View Entire Topic
N1kh1l
Active Contributor
0 Kudos

@Anthony 

In the second story try getting the number of rows from the table. Once the context is passed and the table in the story 2 is refreshed the below code should get you the row count of the table.

var rowcount= Table_2.getRowCount();   // Table_2 is the table with the url from story 2.

 

Hope this helps !!

Nikhil

Anthony
Explorer
0 Kudos
Thanks. unfortunately, Table_2.getRowCount() gives me always 0 even if I have one or several rows
N1kh1l
Active Contributor
0 Kudos

It could depend on when this line of script is getting called. Try putting this code on a button click and once the second story opens up click the button and see what is the value in console.log. I tested it at my end on a table and it gave me correct result. If the results are correct then you can think of where to place this code and if forced refresh on table_2 is required before you read the rows count.