Select to view content in your preferred language

Map Viewer Settings telling me Org url is invalid, when is valid

3552
6
07-29-2015 12:06 PM
CarolSousa
Esri Contributor

Because of previous bug encountered, we edited the appinfo.json file, to enter the url of my organization. Now the settings has this:

My Map Viewer app works, however.

I edited the url in the appinfo.json file to add "www." but it still doesn't like it:

Then I removed the http://, and now it won't work anymore, even after putting it back. It now goes to the default organization (I guess.)

Tags (1)
0 Kudos
6 Replies
HannahFerrier
Deactivated User

The input field for your Organization URL in the Map Viewer Properties contains a regular expression to help with data validation. The expression is:

(http://|https://)(www.)?([a-zA-Z0-9]+).[a-zA-Z0-9]*.[a-z]{3}.?([a-z]+)?

Your URL does not meet these conditions.

Some options for you could be:

1. Ignore the errors in the UI. Your URL has already been successfully saved in the appinfo.json.

2. Edit the regular expression in the appschema.json for your app. This way, you can expand the conditions to include the format of your specific URL.

3. Remove the regular expression completely from the appschema.json.

I hope this helps,

Hannah

CarolSousa
Esri Contributor

The app isn't working now. It goes to the default organization. Even with correct url in the appinfo.json and the regular expression completely removed from the appschema.json.

This is probably not related, but - on the Properties page, I can type my url, but when I get to "arcgis.com" it won't let me put in the "." I can add more letters, but not the dot.

0 Kudos
TracyGarrison
Regular Contributor

Our organizational URL will not work as it will not allow the third "." as in http://co.sangamon.il.us  It always removes the dot after it is typed.

0 Kudos
CarolSousa
Esri Contributor

This must be why my url is failing: apltest.maps.arcgis.com.

Hannah, this needs to be fixed. You can't expect AppStudio users to know how to change that 'regular expression' to accept their organization urls. No programming required, right? We also shouldn't have to edit the json files.

HannahFerrier
Deactivated User

Thank you for your feedback.

I was only hoping to provide you with a workaround to help you continue working on your app projects until the next release of AppStudio for ArcGIS (BETA).

An enhancement request has been raised to loosen the URL restrictions when setting Organization URL using the properties tab for the Map Viewer template.

If you have any further issues, feel free to contact me offline.

Hannah

0 Kudos
GarethWalters
Deactivated User

Hi Carol,

Thanks for the input. We have decided that for that property the validation is not required and have removed it from the template.

Give the system a couple of days to update and you will be able to download the map viewer again. If you are keen to have the update, you can manually edit your appschema.json file. Remove the regex and error properties from the organization url - see below:

```

   {

                        "type": "string",
                        "label": "Organization url",
                        "name": "companyUrl",
                        "placeholder": "Url"
                    }
```

I hope this helps.

Cheers,

Gareth