How to Create a Hyperlink using a JS Trigger
Hi,
I am trying to create a trigger that will take in a value from a field and convert it into a hyperlink and then send it back to the field in Integrity. For example, if a user inputted the value "Tree" into the integrity field, the trigger will take that value and convert it into a hyperlink for the following website: google.com/Tree. It will take this hyperlink and it will replace the value of the field to the newly created hyperlink. Similarly, if a user was to input the value "cat". It will create a hyperlink to the website: google.com/cat and replace the old field value with this hyperlink.
Below, I have included a code that I have so far. It is able to take in the value from a field in Integrity and it will change the value into the link and send it back to that field. The only thing it is missing is creating the hyperlink itself so when I click on it, it will take me to this URL.
function main()
{
var value = delta.getNewFieldValue("Testing for trigger"); // pull value from field called "Testing for trigger"
if (value != null) // Run when the field is not empty
{
var va = "https://www.google.ca/" + assignee; // adds the field value to the end of the line
delta.setFieldValue("Testing for trigger",va); // send the value of va back to the field "Testing for trigger"
return;
}
}

