Opening of dynamic item page from table row select always displays information of first row

Hi All, I have created a dynamic page where I have populated a summary table from dataset. I want to open another dynamic item page on click in table row. I am able to open the page but it always shows details of first row. I want it to show details of row selected (Summary table have few key information where the dynamic item page will have full details)

Because you are in editor mode right? You may open your database and click the link inside the database to visit their individual page.

Please post your wix url so other can understand your situation

Thanks. Now problem has changed.

From menu …I am clicking on view deals page. It opens a table. I want to open another dynamic page on click of row in table. Page I want to open is Deal View . It is saying “Undefined is unsupported URL”

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

I am trying to call dynamic page …it is giving above error

can someone help?

Try this one…

export async function table1_rowSelect(event, $w) {
  let rowData = event.rowData;
  let rowIndex = await event.rowIndex;
  const myRow = event.target.rows[rowIndex];    
  wixLocation.to(`${myRow["/deal-submission-1/"]}`)
}

The roIndex should first be defined, before you can use it (i think).

You should try to work with console-logs, these logs will show you the right way.

export async function table1_rowSelect(event, $w) {
  let rowData = event.rowData;
  let rowIndex = await event.rowIndex;
  console.log(rowData)
  console.log(rowIndex)
  const myRow = event.target.rows[rowIndex]; 
  console.log(myRow)  
  wixLocation.to(`${myRow["/deal-submission-1/"]}`)
}

Thanks …I am able to see data using your code. Problem in call dynamic page line. It is giving error “Undefined is unsupported URL”

link-deal-submission-all-2:
“/deal-submission/”

link-deal-submission-1-title:
“/deal-submission-1/”

link-deal-submission-all:
“/deal-submission/”

link-deal-submission-title:
“/deal-submission/”

Deal Submission (All)
Line 19

Wix code SDK error: undefined is an unsupported url

I am not sure why it is trying to link so many times …

Hi @piushkg :raised_hand_with_fingers_splayed:

You need to access the link from the clicked row using the onRowSelect( ) event handler, then get item link and redirect the user to that page.

$w('#table').onRowSelect(event => {
    wixLocation.to(event.rowData['link-deal-submission-title'])
})

Hope that helps~!
Happy Coding :fire:
Ahmad

Fix url of second dynamic page.