ChadCox
7 years agoQrew Trainee
API_GenResultsTable javascript field that contains url link not present
I am using API_GenResultsTable with jsa=1 to return a JS array of data. It has been working great, until now, when I notice I cannot get the URL for a link that shows up. My QB report will have a column that shows links to PDF files.
When I use API_GenResultsTable jht=1 (to generate HTML) I can get the full URL, as shown below.
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/re3a\/eqb\/va\/My%20file.pdf\x22 target=_blank>My file.pdf<\/a><\/td>");
When I use API_GenResultsTable jsa=1 (to return JavaScript data), I get the result below.
qdb_data[4][9] = "My file.pdf";
I am unable to recreate the URL for each of those files in the JavaScript array. If I have a report with 10 records being returned, all 10 records have different URL paths, so nothing I can logically determine to create the URL.
Example:
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/ra2s\/eqb\/va\/My%20file.pdf\x22 target=_blank>My file.pdf<\/a><\/td>");
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/re5a\/eqb\/va\/My%20file1.pdf\x22 target=_blank>My file1.pdf<\/a><\/td>");
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/rd3e\/eqb\/va\/My%20file2.pdf\x22 target=_blank>My file2.pdf<\/a><\/td>");
The "ra2s" and "re5a" and "rd3e" is the part of the URL that varies. I am not sure where to get that data specific for each file.
Any help? Thanks!
When I use API_GenResultsTable jht=1 (to generate HTML) I can get the full URL, as shown below.
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/re3a\/eqb\/va\/My%20file.pdf\x22 target=_blank>My file.pdf<\/a><\/td>");
When I use API_GenResultsTable jsa=1 (to return JavaScript data), I get the result below.
qdb_data[4][9] = "My file.pdf";
I am unable to recreate the URL for each of those files in the JavaScript array. If I have a report with 10 records being returned, all 10 records have different URL paths, so nothing I can logically determine to create the URL.
Example:
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/ra2s\/eqb\/va\/My%20file.pdf\x22 target=_blank>My file.pdf<\/a><\/td>");
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/re5a\/eqb\/va\/My%20file1.pdf\x22 target=_blank>My file1.pdf<\/a><\/td>");
document.write ("<td class=m align=left><a href=\x22\/up\/abcd318dxb\/g\/rd3e\/eqb\/va\/My%20file2.pdf\x22 target=_blank>My file2.pdf<\/a><\/td>");
The "ra2s" and "re5a" and "rd3e" is the part of the URL that varies. I am not sure where to get that data specific for each file.
Any help? Thanks!