Conditional button links

I’m trying to set the link of a button based on what appears in a text. The data in the text is obtained from a dataset. This is my current code, however, when I click on the button nothing seems to happen.

export function button2_click ( event ) {

let  value  = ( $w ( "#text103" ). text ); 
console . log ( value ); 
if  ( value  ===  "Employment Dispute" ) { 
$w ( "#button2" ). link  =  "https://forms.gle/L6RvyX9Fsfe2Lz3d9" ; 
}  **else if**  ( value  ===  "Real Estate" ) { 

$w ( “#button2” ). link = “https://forms.gle/D3fiFNAMJbaqhWicA” ;
}
}

What does it log to the console?

Also your code can’t work on the first click, because you assign the link to the button after the click. You need to assign it to the button once you got the value from the dataset (and not on click).