Select to view content in your preferred language

Query on last_edited_date attribute

700
2
Jump to solution
01-23-2023 03:43 AM
KARIMLABIDI
Occasional Contributor

Hello everybody, 

I would like to query on the editor tracking attributes, especially last_editor_date on the last month. I tried but I Doesn't wok, I think I'm very far away the answer! I didn't find anything on internet, it would be nice if someone could help me. Thank you!!

//Assign a where clause, returnGeometry, and outFields to the Query class.
 let query = fl_prod.createQuery();
 
 query.where = ???, //The where clause
 query.returnGeometry=false, //The boolean property for returning the geometry
        query.outFields= ["IDARRET", "NOMARRET","MNLP_HASTUS","EDITED"] //The fields to return from the query 

      fl_prod.queryFeatures(query)
      .then(function(response){
        let stats = response.features[0].attributes;
     console.log(stats.Edited);
      });

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

The were clause will be in SQL, so the precise answer can depend on your database backend. This blog article covers the basics, though: https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-ti...

 

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

The were clause will be in SQL, so the precise answer can depend on your database backend. This blog article covers the basics, though: https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-ti...

 

- Josh Carlson
Kendall County GIS
0 Kudos
KARIMLABIDI
Occasional Contributor

Thank you @jcarlson , i found the solution 🙂

query.where = "Edited > CURRENT_TIMESTAMP - 30"
Thank you
0 Kudos