ArcGIS Blog

Field Operations

ArcGIS Workforce

Create a Classic Workforce project with ArcGIS API for Python

By Josh Clifford

The August 2020 release of ArcGIS Workforce allows you to create projects that are enabled for offline use. Projects created prior to this release are now categorized as Classic projects and listed in the Classic section of the Projects page.  

Project page displaying projects enabled for offline use and Classic projects

While you can continue to manage your Classic projects using the Workforce web app, clicking Create Project will only create projects enabled for offline use in ArcGIS Workforce. To create Classic projects for use in Workforce for ArcGIS, you must use ArcGIS API for Python 

Follow along with this blog post to install ArcGIS API for Python and create a Classic project.  

Note: Classic projects will only work in the Classic version of the mobile app, listed as Workforce for ArcGIS. They will not appear in ArcGIS Workforce. The icons for the different store listings are shown below.

Workforce for ArcGIS and ArcGIS Workforce store listings

For information on migrating Classic projects to projects that will appear in ArcGIS Workforce, see Migrate Classic projects 

Install ArcGIS API for Python

To automate and script Workforce projects, and to create a Classic project, you must use ArcGIS API for Python 1.8.3 or later. To learn how to install ArcGIS API for Python, see Install and set up ArcGIS API for Python

Once you’ve installed ArcGIS API for Python, you are ready to create a Classic project 

Create a Classic project

Complete the following steps in either a Python script or Python console.  

First, import the ArcGIS library:


import arcgis 

Next, log in to your ArcGIS Online account using your login credentials:


gis = arcgis.gis.GIS("https://arcgis.com", "<username>", "<password>")

Finally, run the following command to create a Classic project, also known as a version 1 project. Be sure to give your project a meaningful title and summary:


version1_project = arcgis.apps.workforce.create_project("<project-title>", "<project-summary>", major_version=1) 

After running this command, the Classic project is created and appears in the Workforce web appYou can configure the Classic project in the web app or with the Workforce module in ArcGIS API For Python 

For more information on working with Classic projects, see Create your first project (Classic) or Automate and Script Workforce (Classic) 

Share this article

Subscribe
Notify of
0 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Paul Cyr(@cyrpl_mecl)
June 26, 2023 10:36 am

In a geo database, dataset folder objects are prefixed with old database name .dbo. feature class names. What is the process of making these objects operate correctly after the database name is changed?

Paul Cyr(@cyrpl_mecl)
June 26, 2023 11:00 am
Reply to  Chet Dobbins

I am opening the database in ArcGIS Pro 3.1.2 and all the datasets still have the old database name and none of the feature classes in the dataset folders are available. The geo databases on both the new testing server and the production server is still 10.8.1.
So, to get this to work properly must I upgrade my geodatabase version to be 11.x on the production server?

Paul Cyr(@cyrpl_mecl)
June 26, 2023 11:21 am
Reply to  Chet Dobbins

Esri Case #03373162

I need to understand why I can’t do the geo database upgrade on the destination server. I do not want to touch my production environment. I want to migrate apps and services over to the freshly upgraded geo databases on the new SQL 2022 server.

Pasi Hyvonen(@phyvonenesriuk-com_esriuk)
August 15, 2023 9:39 am

Hi Chet – is this new ability to change database name specific to SQL Server only or would the same apply to Postgres as well, so the system tables there wouldn’t store the database names either?

Alison Wieckowicz(@alison-wieckowicz_mndot)
June 4, 2024 9:27 am
Reply to  Pasi Hyvonen

Was this question answered?