Select to view content in your preferred language

ASK FOR ARCADE STATEMENTS TO AVOID DUPLICATION OF ELECTRIC METER NUMBER IN LV SERVICE

1078
3
02-22-2024 08:04 AM
RomuldKiobya
Regular Contributor

We have added field called Meter number (data type string/char) at LV Service and MV Service. we have collected data; we have handover job to client. and we want to avoid duplication when incremental data from the site will be captured. I need either someone to give arcade statement on Field map app or ArcGIS pro or Portal for ArcGIS that will disallow duplication of meter number.

3 Replies
GIS_Spellblade
Frequent Contributor

You could use some logic similar to this:

var search_duplicate = $feature.FACILITYID
var features = FEATURESETBYNAME($datastore, "Featureclass Name Here")
var sqlExpression = "A_FIELD_NAME_HERE = @search_duplicate"
var result = FILTER(features, sqlExpression)

WHEN(
  COUNT(result) > 1, `Duplicate Value, choose another ID`,
  $feature.FACILITYID
)

Or you could use a sequence:

https://support.esri.com/en-us/knowledge-base/how-to-add-auto-sequential-values-using-attribute-rule...

Also, this post has a great solution to what you're asking for:

https://community.esri.com/t5/arcgis-field-maps-questions/arcgis-fieldmaps-form-calculate-expression...

RomuldKiobya
Regular Contributor

Is working,thanks

AarynPersson
Esri Contributor

 

Here are some additional resources about configuring your data with Arcade. Check out this session from IMGIS 2024. We go over topics like duplications of attributes, barcode scan to attribution, text and pop up formatting in ArcGIS Dashboards and form calculations. https://imgis2024.esri.com/flow/esri/24imgis/eventportal/page/detailed-agenda/session/17240862240100...