Can I add field data to a hyperlink in writer.

What I’m trying to do is add a hyperlink to feed an online registration form ie https://form.url.com?registrationid=<regid>. If I try to do this through the auto recognize it only finds the part before the = as a hyperlink. Is there a method in write to do something like you can with the HYPERLINK() formula in calc…

Examples :

https://form.url.com?registrationid=<regid> – shows https://form.url.com?registrationid=123ABC but hyperlink only does https://form.url.com?registrationid

shows https://form.url.com?registrationid=123ABC but it’s not a hyperlink

in calc HYPERLINK("https://form.url.com?registrationid="&B1) works perfectly

As far as I could find there is no way to add field data into the insert hyperlink section it just puts what ever you type in there.

Ok maybe this willl help with what I’m trying to do…
here’s a test url that I’ll work with: https://form.jotform.com/210562881190050?registrationId=<field from spreadsheet>

in writer I’m building an email merge to sent out invites to the event and am trying to auto fill the registration id form:

 Hello <Name>, you have been selected for the next round of our event.  Please go to https://form.jotform.com/210562881190050?registrationId=<regid> to schedule your appointment.

Where <Name> and <regid> are fields from the spreadsheet.

this would send an email of:

 Hello John Doe, you have been scheduled for the next round of our event.  Please go to https://form.jotform.com/210562881190050?registrationID=123ABC to schedule your appointment.

While it looks fine only the https://form.jotform.com/210562881190050?registrationID is set as a URL it drops the =123ABC portion

(reformatted by ajlittoz to make it understandable)

Have you tried with Insert>Hyperlink where everything is under your manual control?

Please do not use Add Answer but edit your original question to enhance the details of your question (answers are reserved for solutions to a problem on this Q&A site).

What about URL-encoding?
https://form.url.com/something.kind?registrationid=%3Cregid%3E should work.
Are you sure it’s legal to append the query part immediately behing the tld?

A second pass after @ajlittoz edited the question for better readability, made clear to me that the intention not was to add a reference(enclosed with angle brackets) to the link, but the automatically updatable value of that reference.
To make this feasible the link would need to be a TextField providing the functionality. Actually a hperlink URL in Writer is assigned as a string constant to the character-property .HyperLinkURL of a TextRange.

I experimented various hacks trying to fool Writer to no avail.

The difficulty comes from the fact that a hyperlink is made of two layers: what you see and the destination. The destination is recorded in an unvisible XML element surrounding the visible part.

The visible part can be composed of whatever you like, made with typed text, field insertion, pictures, … BUT the target will be extracted starting from the beginning and stopping at the first non-text element.

You can try to disabled automatic target extraction with Insert>Hyperlink but you are even more restricted. The Text parameter is what will be visible. You can put there only typed text. The URL box is managed the same way. Since you can only enter text, this explains why the URL can’t be modified by field insertion.

Stubbornly, I insisted to type http://localhost.localdomain/ (localhost by itself is not recognised as a valid URL, a domain name is mandatory!) followed by a field insertion. Then I selected the whole and character-styled it Internet Link. As feared, this only changed the formatting and had no effect on the captured URL which was not even computed because it was not followed by a space.

The answer is then:

In the present state, a URL cannot be synthesised with field insertion in Writer.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.