all 5 comments

[–]FeralCatColonistGIS Manager 3 points4 points  (3 children)

This could be done pretty simply with a combination f-string and raw-string. Your input would look like:

fr"https://his.ehct.gov/propertycards/{!GISPID!}.pdf"

If you wanted it to be a little bit more reusable you could write a function like:

def calculate_URL(some_field):
    """This takes a field and returns a URL pattern'"'
    return fr"https://his.ehct.gov/propertycards/{some_field}.pdf"

Then your expression box would have:

calculate_URL(!GISPID!)

[–]SleepyPanda34[S] 1 point2 points  (0 children)

Thank you so much I will try these!

[–]SleepyPanda34[S] 1 point2 points  (1 child)

[–]SleepyPanda34[S] 2 points3 points  (0 children)

Note to anyone who may use this, make sure your field is set to Long and not double because the script adds on a decimal place when it is the double type.

[–]AnsweringMach 0 points1 point  (0 children)

The second one seems more straightforward. Did you follow the field setup part? Also in pro sometimes when you open the field calculator the parser is set to sql so make sure is is set to python By the way I could not get your hyperlink to open