Unsuccessful at linking table row to a dynamic page

Hi everyone. I’ve looked at previous posts regarding linking table rows to dynamic pages after a search is done by the user. I saw from two earlier post, such as the following https://www.wix.com/code/home/forum/community-discussion/link-search-results-in-table-to-product-page-based-on-row-solved

The user’s last line is what I’m having an issue with
wixLocation.to (${myRow["productPageUrl"]})

I’m not sure how to implement this properly into my table. This is the code I am currently using

import wixLocation from ‘wix-location’;

export function table1_rowSelect(event, $w) {
let rowData = event.rowData;
let rowIndex = event.rowIndex;
const myRow = event.target.rows[rowIndex];
wixLocation.to(${myRow["Drugs-Name"]})
}

What am I supposed to enter where I put “Drugs-Name”? “Drugs” is the name of my database, and “Name” is the name of the dynamic page.

Let me know,
Thanks.

Hi John,

If you are unsure on how to link to a dynamic page just check this out.

To find the local URL of a Dynamic page:

See the Page Info tab of the Page Settings panel for the URL structure. The actual URL used for navigation needs to contain values where the placeholders are.
For example, if the URL structure of your dynamic page looks like:


and you have an item with the title “Waffles”, the local URL to that page is /Recipes/Waffles.

Hope this helps!

Dara | Corvid Team