Select to view content in your preferred language

List widget, with group by and advanced format

540
8
03-21-2024 01:38 AM
Labels (1)
PSGeo
by
Occasional Contributor

Dear all, 

I am using the list widget in Dashboards. The data I am using is from an expression. This expression uses FeatureSetByPortal Item and return a groupby.

but the result listed is the code and not the description of the domain.

Therefore I used advanced format with the following code (not all the vehicles are listed):

 

 

var CD = $datapoint.XFM
When (CD ==1, "Car",
CD==10,"Vessel",
CD==9,"Aircraft",
Null);

Return {
  text color:''
  attributes: {
    attribute1: CD
  }
}

 

 

 

And in the "Line Item template" I have:  {expression/attribute1}

It keeps showing the domain value instead of the description. Besides that in the actions I cannot make it highlight in the map the selected feature...

can someone help?

cheers

P

8 Replies
PSGeo
by
Occasional Contributor

Hi, 

I had an answer in my email... but I cannot see it here...

I have the first part of the question answered. Missing the action item. does someone knows this?

Many thanks to KRankin (New Contributor II)  for the answer for the first question:

"Im not sure about the data action to make it filter/highlight on the map. As for the arcade, it looks like you're returning the variable you assigned with the domain "CD". Add a variable and assign the description from the when statement: "var desc = When()..." var CD = $datapoint.XFM var desc = When (CD ==1, "Car", CD==10,"Vessel", CD==9,"Aircraft", Null); Return { text color:'' attributes: { attribute1: desc } }   -Keenan "

 

cheers

P

0 Kudos
KRankin
New Contributor III

Glad that worked for you. I deleted it shortly after posting because I didn't get to double check my answer before leaving work, apologies.

 

As for the action item, can you go into more detail? ..Normally, if you want to filter the layer on your map that is populating your list, it would be: Configure->Actions -> Filter-> toggle the data source.

 

-Keenan

PSGeo
by
Occasional Contributor
Hi,
I cannot check it... I just entered in easter holidays.
When i return i will have a look back to it and come back to you with an answer.
Cheers
Pedro


0 Kudos
PSGeo
by
Occasional Contributor

Hi Keenan,

back to the dashboard. In particular to the actions.

It only allows to filter, and I want to click on the element on my list and it to flash on the map.

there is no option for that. I wonder if is due to all that coding for creating the list.

 

0 Kudos
KRankin
New Contributor III

That is strange. inserting advanced formatting should not limit the actions for a widget. Can you share a screen shot of what you see, when you're in the actions section of the list.

PSGeo
by
Occasional Contributor

Hi,

I made some testing and I think that is related with a creation of the expression: Data/edit data expression.

when I have the an expression defining the list, it rules out all the other actions except for the filter.

When there is none, all the actions are available.

Could it be a bug? I am using the ArcGIS Enterprise 10.9.1

cheers

 

 

 

 

screenshot_Pedro.jpg

0 Kudos
KRankin
New Contributor III

Ah yes, if you're using data expressions then that would limit your actions ability to filter only. Not a bug, it happens on my end too (i'm not using enterprise).

PSGeo
by
Occasional Contributor

well. that is unfortunate 😞

 

I wonder if there is another way to show the grouped values on any other widget and make them highlight in the map...

cheers

 

0 Kudos