POST
|
I have the same issue. Likely related to bug 000139253 Workaround is to append your expressions to fieldInfos field1 = {
"fieldName": "expression/expr1",
"visible": "true"
}
field2 = {
"fieldName": "expression/expr2",
"visible": "true"
}
field_info = wm_object.layers[0].popupInfo.fieldInfos
field_info.extend([field1,field2])
wm_object.layers[0].popupInfo.fieldInfos = field_info
# #Update web map
wm_object.update()
... View more
03-02-2023
06:50 PM
|
0
|
0
|
484
|
POST
|
Hopefully you've solved this before now, but for others in the same boat.. A likely cause is if your filter returns nothing, First() then returns null and you're attempting to retrieve the description attribute on a null, which needs to be handled. var target = First(Filter(tbl, sql));
if(IsEmpty(target)) return '';
return target.description;
... View more
02-22-2023
06:07 PM
|
0
|
0
|
1363
|
POST
|
Thanks for this @ZoltanKelly, works well. Just a quick note, I don't know if it's changed, or it's because I'm targeting enterprise instead of AGOL, but the features were index 1. Also, if you extract the fields (index 2 for me) you can extract the field names with List.Accumulate and pass these to ExpandRecordColumn to avoid having to hardcode the field names. source = Json.Document(Web.Contents(queryURL), 65001),
//Process Data
LayerDataTable = Record.ToTable(source),
features = LayerDataTable{1}[Value],
fields = LayerDataTable{2}[Value],
fieldNames = List.Accumulate( fields, {}, (s,c)=> List.Combine({ s, {Record.Field(c,"name")} }) ),
featuresTable = Table.FromList(features, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
expandedColumn = Table.ExpandRecordColumn(featuresTable, "Column1", {"attributes"}, {"attributes"}),
expandedAttributes = Table.ExpandRecordColumn(expandedColumn, "attributes", fieldNames)
... View more
01-19-2023
10:40 PM
|
0
|
2
|
3168
|
DOC
|
Copying my answer from the same SO post that brought me here. If your layer is hosted in AGOL, you can now use the map viewer beta and select the gallery option for attachments under configure pop-up. This option is currently disabled for enterprise/portal hosted layers. An ideal workaround is to create a web app with the attachment viewer template. If you're on an older version of enterprise (as we are) there is a bug where an attachment viewer app doesn't honour image orientation. The workaround I've developed, which may be useful to others in similar circumstance, is: Calculate a field (using arcade) including comma-separated attachment IDs: //calculate the attach IDs field
function IDs(f){
return f.ID;
}
var Attach_ = Attachments($feature);
var AttachIDs = Map(Attach_, IDs);
return Concatenate(AttachIDs,','); This must be a field CALCULATE as attribute expressions do not currently support the Attachments function. I believe an attribute rule may also work. Once the above is available, you can add attribute expressions in your pop-up (1 per attached image) as: //build the URL for image attachment <ImageNumber>
var ImageNumber = 0
var AttachIDs = split($feature.AttachmentIDs,',')
if(ImageNumber > count(AttachIDs) - 1)
return ''
var AttachID = AttachIDs[ImageNumber]
var BaseURL = "<your_domain>/server/rest/services/Hosted/LayerName/FeatureServer/0/"
var ObjectID = $feature.OBJECTID
return BaseURL + ObjectID + "/attachments/" + AttachID ImageNumber must be incremented for each expression, starting from 0. After that you can add an image per attachment as pop-up media, referencing the matching attribute expression for the url and link fields.
... View more
12-15-2022
12:57 AM
|
0
|
0
|
2044
|
POST
|
I don't know if options for authentication have changed since, but the above isn't true. You can log into arcgis.com with your developer account and you will be redirected to your personal "organisation" with a URL that can be used to authenticate WAB DE e.g. https://fhwockdkghrk.maps.arcgis.com/home/ You can then add a new application for oAuth at https://developers.arcgis.com/applications/ and use the Client ID as the application ID.
... View more
05-25-2022
10:55 PM
|
0
|
0
|
310
|
POST
|
Is the initialisation of the LabelDefinition correct in the following example? (https://developers.arcgis.com/net/styles-and-data-visualization/add-labels/) LabelDefinition labelDefSmall = new LabelDefinition
{
WhereClause = "[POPULATION] < 500000",
TextSymbol = textSymbolSmallCities,
Expression = new ArcadeLabelExpression("return $feature.name;"),
// Expression = new SimpleLabelExpression("[NAME]"),
Placement = Esri.ArcGISRuntime.ArcGISServices.LabelingPlacement.PointBelowCenter
}; I was banging my head dealing with an error that LabelDefintion wasn't supplied the required LabelExpression parameter when, reading the documentation, I realised it should be: LabelDefinition labelDefSmall = new LabelDefinition(new ArcadeLabelExpression("return $feature.name;"), textSymbolSmallCities)
{
WhereClause = "[POPULATION] < 500000",
Placement = Esri.ArcGISRuntime.ArcGISServices.LabelingPlacement.PointBelowCenter
}; Thanks
... View more
03-20-2022
05:07 PM
|
0
|
0
|
293
|
IDEA
|
@WendyHarrison what if you only want to mask a single layer or subset of layers, but the mask layer covers other layers that still require labelling? From my understanding this workaround would be an all or nothing approach. Cheers
... View more
11-30-2021
03:16 PM
|
0
|
0
|
4485
|
POST
|
If your local data matches the feature layer exactly and you don't need to reconcile schema differences etc. then it is easier to do: sdf_to_append = pd.DataFrame.spatial.from_featureclass(r"path to gdb feature class")
feat_set = FeatureSet.from_dataframe(sdf_to_append)
feature_layers[0].edit_features(adds = feat_set)
... View more
11-18-2021
07:11 PM
|
1
|
0
|
2673
|
POST
|
I have the same issue. Many of the tools, when batched, ignore input parameters and are unusable. Best to report it to ESRI/your local provider so it can be officially reported as a bug.
... View more
09-13-2021
11:24 PM
|
0
|
0
|
717
|
IDEA
|
These seems like pretty basic/expected functionality that is a pain to work around
... View more
07-11-2021
07:45 PM
|
0
|
0
|
5071
|
POST
|
No, iterating FCs in model builder is the only alternative approach I've had as well. You should be able to use the wildcard feature to limit classes it operates on, but yes it will check all candidates in a workspace. If you're having problems with the field map, I recommend connecting an example class to the FC to FC tool in MB, setting your field map to your liking, the n connecting the iterator back to the tool. It will maintain the field map and apply it to the inputs from each iteration.
... View more
06-21-2021
01:12 AM
|
1
|
0
|
1842
|
POST
|
Same problem in 2.8 Came across this thread looking to see if the bug had reported, only to discover it was me 😀
... View more
06-20-2021
11:41 PM
|
2
|
2
|
1844
|
POST
|
Thanks Dan, looks to be the same bug, but it appears to apply to layers from independent feature services or even local GDBs as well. Good to know it has been noted, but disconcerting that it was reported August last year.
... View more
03-02-2020
05:35 PM
|
2
|
2
|
2059
|
POST
|
When running feature class to feature class as a batch tool in ArcGIS Pro and providing multiple input classes or layers, the field mapping shows incorrect schema. Running the tool also produces outputs with incorrect schema. Can someone please confirm if they can reproduce this or if it is just me. Thanks
... View more
03-02-2020
03:38 PM
|
4
|
14
|
2600
|
Title | Kudos | Posted |
---|---|---|
1 | 06-21-2021 01:12 AM | |
2 | 06-20-2021 11:41 PM | |
1 | 11-18-2021 07:11 PM | |
2 | 10-09-2019 08:14 PM | |
4 | 03-02-2020 03:38 PM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|