Giter Site home page Giter Site logo

Comments (8)

apulverizer avatar apulverizer commented on June 12, 2024 1

Ah the wonders of Enterprise :)

The actual names of those fields is different between Online and Enterprise (due to how the feature service is implemented). If you look at the layer definition for assignments (json) for the assignments layer you will see those fields are defined as:

"editFieldsInfo": {
    "creationDateField": "created_date",
    "creatorField": "created_user",
    "editDateField": "last_edited_date",
    "editorField": "last_edited_user"
}

For example, try using created_date instead of CreationDate.

This is why in the Python API we provide the following property project._assignment_schema.creation_date to get the creation date field name, instead of hard-coding it to a string.

Hopefully that resolves your issue.

from workforce-scripts.

apulverizer avatar apulverizer commented on June 12, 2024

@cpsmhammond

My guess is the field_mappings dictionary does not have the "globalid" field. Perhaps it's "GlobalID" or "GlobalId"?

from workforce-scripts.

cpsmhammond avatar cpsmhammond commented on June 12, 2024

Thanks for that quick response.. that lead me down the right track.. mostly. I had to adjust my mappings file so every key is lowercase, but the keys below don't work no matter what case i choose.. any other ideas?

creationdate: CreationDate
Creator: Creator
EditDate: EditDate
Editor: Editor

Banging my head against the wall has not yet resulted in anything positive so I'm hopeful you can help out again! :)

Mark

from workforce-scripts.

cpsmhammond avatar cpsmhammond commented on June 12, 2024

I owe you. thank you.

from workforce-scripts.

cpsmhammond avatar cpsmhammond commented on June 12, 2024

I wonder if there are more changes with Enterprise? I'm getting a "Geometry could not be set" now on line 121.

from workforce-scripts.

apulverizer avatar apulverizer commented on June 12, 2024

I haven't seen that error before. Do any of the assignments have missing or invalid geometries somehow?

from workforce-scripts.

cpsmhammond avatar cpsmhammond commented on June 12, 2024

I haven't seen that error before. Do any of the assignments have missing or invalid geometries somehow?

I got it solved, script is working.

the assignment.geometry didn't have a spatialreference, i had to add 1 line of code to update it with 4326 which is what we use.

after line 103
assignment.geometry = dict(x=float(assignment.geometry["x"]),y=float(assignment.geometry["y"]),spatialReference=dict(wkid=int(4326)))

Thanks

from workforce-scripts.

apulverizer avatar apulverizer commented on June 12, 2024

Closing since this was resolved.

from workforce-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.