Trying to link a button to a link in database which is generated by a "after insert hook"

I have created a URL field in database which is populated by a hook after an insertion is done, which you can see below:

I have linked the button’s Click action connects to, to this field. But the button just doesn’t work after clicking the button, basically the button doesn’t work.

Can anyone please help?

EDIT: I f I type the link instead of generating it from a hook, then the link is getting inserted in the button and the button starts working.

Hello Firstworld…

i am not sure, but one of the reasons could be, if the database witch your link is connected to, allows the access not for everybody.

Check access-permissions of your database, perhaps that’s it?

No, the permission is set to “site content”.

There’s been an update, if i type the link instead of generating it from a hook, then the link is getting inserted in the button and the button starts working.

We need more information in order to be of assistance. Please show your code (in a code block).