0

I am new to ArcGIS Pro. I'm working with a File Database which contained different fields.

The PopupInfo field has both cases, one is access link (URL) and another is chinese language (image below). In some cases, the URL and Chinese language join the same row but not all. In those cases, The first field values is always the URL.

What I am trying to do is that I would like to separate them.. The URL will move to the field URL, same as Chinese language. I have no ideas how to separate them without copying and pasting but it surely costs a lot of time. Does anyone know how to deal with this problem in ArcGIS?

enter image description here

10
  • 1
    Please Edit the Question to give an indication of the source of this data (database, file geodatabase, shapefile,...) and an indication of how the two data values are separated in the one field.
    – Vince
    Commented Feb 20, 2023 at 4:19
  • From what I can see the PopupInfo is either a URL or a phrase in Chinese language. I assume you want the URL in the AccessLink, to do this I would select by attributes on the table where PopupInfo like 'http%' for a file geodatabase or in_memory workspase then use calculate field to copy PopupInfo into AccessLink. Commented Feb 20, 2023 at 4:27
  • 1
    I can't see any examples (in your illustration) of where both types of information are in the one field. Are they both in the one field for some records? Or is it always one or the other? If both, is the URL always first? Is there always a space character between them? Please make this more clear. Perhaps replace your image with an image that shows the field wider so that its content can be seen fully. Commented Feb 20, 2023 at 4:27
  • Thanks for updating the image. However, it's still not entirely clear what the possible data formats could be. Eg, If there is a URL in the field, is it always at the very end of the field's value? Commented Feb 20, 2023 at 4:39
  • 1
    URLs do not contain spaces so you can do an advanced field calculation (pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/…) by splitting the text by spaces, then a URL will be one of the strings in the list, iterate over them until the token starts with 'http' then return that or return '' if the iterator gets to the end. To get the rest remove the URL from the list and then ' '.join() what's not URL in the list, but you can't do both in one calculation. Commented Feb 20, 2023 at 4:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.