on 2024 Oct 21 1:10 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
45 | |
9 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.