Dynamic URL created by logic hook

So I am building out somewhat of a learning management system and a simplified example is that a record on a module has two fields - Checkbox field for Do Step 1 and a link to what step 1 entails. Some of these fields refer to items that I’ve stored as documents within knowledge base entries. I am trying to find a way to make this migration safe to link to the specific documents. I am hoping to do this with a logic hook, where I would build up the url information through a quick My SQL call (select id from documents where name = “step 1” kind of thing) and then build it up to where the url is

$url = ‘public/#/documents/record/’+idFromabove … need to concat it or whatever, that part I have a path on. The issue is setting the TextBlock field of the created url into something like Step 1 and having it render the HTML.

From what I’ve seen, something like this was at least at one point possible with a process record logic hook, but I was doing some testing and I can get it to render as the HTML / Link.

Ran a few initial tests with information like.

$testUrl = '<a href="www.google.com">Test</a>';
 $bean->test_c = $testUrl;

OR
 $bean->test_c = html_entity_decode($testUrl);

But none of them are seeming to render the URL.