Using Calculated Expressions with Related Records in ArcGIS Field Maps

Поділитися
Вставка
  • Опубліковано 24 січ 2025

КОМЕНТАРІ • 14

  • @esri_arcgis
    @esri_arcgis  Рік тому

    Thank you for watching! If you have questions about our products or services, make sure to visit community.esri.com/. Is there a general topic you’d like us to cover in a future video? Let us know in the comments below!

  • @DavidAllen-y5e
    @DavidAllen-y5e Рік тому +2

    Video was very helpful, thanks!
    Why don't y'all ever want to use the When() function instead of the IF statement? It's so much more elegant, especially if you have more than one condition to check for.
    return When(!IsEmpty(feature) , feature['FACILITYID'] , null )
    Arcade expressions are calculated on the fly, so the more concise your code the faster it will run. The challenge for the ultimate speed would be to take your 7 lines of code and have them on one line.

    • @DavidAllen-y5e
      @DavidAllen-y5e 10 місяців тому

      This example pulls over the address from a related table:
      When(!IsEmpty(First(FeatureSetByRelationshipName($feature, "Site ID",['Address']))), First(FeatureSetByRelationshipName($feature, "Site ID",['Address']))['Address'], null)

  • @saintuk70
    @saintuk70 Рік тому

    This is really useful, thank you.

  • @mhmurdock83
    @mhmurdock83 Рік тому

    Helped out a ton thanks for posting

  • @ashliehildebrand7192
    @ashliehildebrand7192 5 місяців тому +1

    How would you be able to do this same thing but for an existing point layer in field maps that has attributes that I want to copy into a layer that I am creating on top of the existing point layer?

    • @JacobSchott-z8s
      @JacobSchott-z8s 4 місяці тому

      I found a solution that works if your two features are intersecting.
      var points = FeatureSetByName($map,"Test_Points") /* this gets the 'Test Points' layer from my collection map*/
      var intersects = Intersects(Geometry($feature), points) /* this gets all the 'Test Points' that intersect my line attribute */
      var cont = Count(intersects) /* this counts all the points that intersected my line */
      if (cont>0){ */ I was trying to order the highest to largest slope with this loop, it may not be necessary for your purposes*/
      for (var f in intersects) {
      var description = f.Calculated_Slope; /* this fills my description variable with the calculated slope from my other line*/
      result = description
      else{ result = 0}
      return result
      Hope this helps!

  • @gistech8777
    @gistech8777 8 місяців тому

    a lot of thanks!

  • @BAGIS3
    @BAGIS3 Рік тому +1

    I've tried this for like an hour, but can't seem to get it to actually work.

    • @natebush9961
      @natebush9961 5 місяців тому

      same - did you ever get it work?

  • @christinebreddy4554
    @christinebreddy4554 Рік тому

    Does this work if going through ArcGIS Online to use Field Maps App or does this only work if you are using ArcGIS Enterprise?

    • @DavidAllen-y5e
      @DavidAllen-y5e Рік тому

      Works for me with my ArcGIS Online license ... we don't have Enterprise.

  • @MappingRantauprapat
    @MappingRantauprapat 6 місяців тому

    Nice

  • @dzurisintube
    @dzurisintube Рік тому

    Offline enabled?