So far, so good...

But now I need to put a hyperlink of dynamic item in a text box, that receives a data from a query. Lets see:

import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;

export function button1_click_1($w) {
wixData.query(“BaseRV”)
.find()
.then((results) => {
let random = (Math.floor((Math.random() * 40) + 1));
let item = results.items[random];
$w(“#text11”).text = item.codigo;

		console.log(item); <== here the firts item of database appears 
		
		$w('#text11').onClick(() => { 
		wixLocation.to(); <== but I don´t know how to solve with wixLocation.to... 
		}); 

	}) 
	
	.catch((err) => { 
		let errorMsg = err; 
		console.log(errorMsg); 
				
	}); 

}

Any help?

Thanks in advance!

Solved!!

wixLocation.to(item[“link-BaseRV-title”]);

:slight_smile: