Nov 16, 2021 07:17 PM
I created a “sandbox” base to develop this script to create a new hypertext field from a text field and a URL field:
When I got it working in the test base, I copied the code into my live base. The field names were different there, so I edited the script accordingly. I ran it and it worked.
This script doesn’t run automatically, so after I entered new records, I ran it again to populate the empty hypertext field in the new records. Now the script doesn’t work properly. It calls the text and the URL into the destination field, but it doesn’t format them as hypertext. Here’s the result:
I checked that the destination field was long text with rich formatting enabled. The code still works in the sandbox base, so I tried copying it back into the live base (and changed the field names again in the script). Will not work, even if I create a brand new destination field for the hypertext. What could be wrong in my live base that’s keeping the URL from embedding when I’m using the same code that works in my test base?
Solved! Go to Solution.
Nov 16, 2021 08:10 PM
Your result looks like it is missing a closing parentheses. Could it have been deleted in the code?
Nov 16, 2021 08:10 PM
Your result looks like it is missing a closing parentheses. Could it have been deleted in the code?
Nov 17, 2021 05:41 AM
Yes, the results all have an opening parenthesis on the URL, but not a closing one. Looking at the code, however, I can’t see any place where a closing parenthesis is missing.
Nov 17, 2021 05:55 AM
You pointed me in the right direction. Thank you! Thinking about the URL not having the closing parenthesis prompted me to check the type of the URL field. It had somehow been changed to long text instead of URL. I converted it to a URL field and now my code is working again. Thank you!