How to create Hyperlink within an if{}
Hello,
i have the following problem:
a Word-document contains some REF values like “isNewCustomer”. The text should show a textblock with an hyperlink only for new customers. I tried IF {} in two ways:
enclose the whole text-block including hyperlink, so the HYPERLINK {} is inside the IF{}use a hyperlink that has the IF {} inside the HYPERLINK{}
I hope i transfered my code fully to this answer because fieldfunctions can noct be copied into text.
The text should apper for new customer as
Hello customer,
you can user our services. As new customer you have to register first via “https://email address removed for privacy reasons”. After registration…
For an existing customer it should be
Hello customer,
you can user our services. After registration…
I tried as follows:
Hello customer,
you can user our services. { IF { REF isNewCustomer } = “true” “As new customer you have to register first via { HYPERLINK “https://email address removed for privacy reasons” } } After registration…
With this way of code the hyperlink included in the IF {} appears as pure text, not as a link.
Then I tried to build different text-blocks:
at first a text – block for all customer without any if{}after that the text for new customers with an if {} and without any linkafter that the hyperlink for new customers that contains an if{} in the HYPERLINK field function to show the hyperlink if it is an new customer and an empty string if it is not a new customerafter that the text that should appear after the link
Hello customer,
you can user our services. { IF { REF isNewCustomer } = “true” “As new customer you have to register first via ” } HYPERLINK { IF { REF isNewCustomer } = “true” “https://email address removed for privacy reasons” “”} } After registration…
In this way of code the link cannot been empty in the case that “isNewCustomer = “false”. When false I get “wrong hyperlink” because HYPERLINK { IF {…} is parsed as HYPLERLINK { “” }. It is the same when leaving the third paramter of the IF empty (HYPERLINK { IF { true “Link” } }.
If the newCustomer REF is true the hyperlink is shown as link but I can’t edit an other text. The short hyperlink here is only an example. The real link is about 200 characters long and should by displayed as “klick here” and open the real link by klick.
Ist there any way in Office 365 to fill in a hyperlink only if a REF variable has the suitable content, show an other text for the link and leave all blank if the REF doesn’t fit?
Many thanks
Siegbert
Hello,i have the following problem:a Word-document contains some REF values like “isNewCustomer”. The text should show a textblock with an hyperlink only for new customers. I tried IF {} in two ways:enclose the whole text-block including hyperlink, so the HYPERLINK {} is inside the IF{}use a hyperlink that has the IF {} inside the HYPERLINK{} I hope i transfered my code fully to this answer because fieldfunctions can noct be copied into text. The text should apper for new customer as Hello customer,
you can user our services. As new customer you have to register first via “https://email address removed for privacy reasons”. After registration… For an existing customer it should be Hello customer,
you can user our services. After registration… I tried as follows: Hello customer,
you can user our services. { IF { REF isNewCustomer } = “true” “As new customer you have to register first via { HYPERLINK “https://email address removed for privacy reasons” } } After registration… With this way of code the hyperlink included in the IF {} appears as pure text, not as a link. Then I tried to build different text-blocks:at first a text – block for all customer without any if{}after that the text for new customers with an if {} and without any linkafter that the hyperlink for new customers that contains an if{} in the HYPERLINK field function to show the hyperlink if it is an new customer and an empty string if it is not a new customerafter that the text that should appear after the link Hello customer,
you can user our services. { IF { REF isNewCustomer } = “true” “As new customer you have to register first via ” } HYPERLINK { IF { REF isNewCustomer } = “true” “https://email address removed for privacy reasons” “”} } After registration… In this way of code the link cannot been empty in the case that “isNewCustomer = “false”. When false I get “wrong hyperlink” because HYPERLINK { IF {…} is parsed as HYPLERLINK { “” }. It is the same when leaving the third paramter of the IF empty (HYPERLINK { IF { true “Link” } }.If the newCustomer REF is true the hyperlink is shown as link but I can’t edit an other text. The short hyperlink here is only an example. The real link is about 200 characters long and should by displayed as “klick here” and open the real link by klick. Ist there any way in Office 365 to fill in a hyperlink only if a REF variable has the suitable content, show an other text for the link and leave all blank if the REF doesn’t fit? Many thanksSiegbert Read More