Add Null to a DataItem List
I am trying to recreate what an editor would see in ArcMap for a field with a coded value domain assigned to it. I am able to use GetCodedValueDomain & ListToDataItemList to populate a ComboBox on a Display Form. I am then able to use an Assign activity in the RuntimeModifications to set the default selected value of the ComboBox to the existing attribute value of the feature.
This works great when the existing attribute value is not Null. Is there a way to add Null to my DataItemList so that the ComboBox's behavior matches ArcMap's?
_img_ alt="Here is what an editor sees in ArcMap" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906f2000000fy74&feoid=Body&refid=0EMf2000000kChO"_/_img__img_ alt="Here is what the DataItemList from a coded value domain looks like in a ComboBox in Geocortex" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906f2000000fy74&feoid=Body&refid=0EMf2000000kChT"_/_img_
0
-
You can add an item to your dataitemlist with an Add To Collection activity. Collection = myDataItemList TypeArgument = Geocortex.Forms.Client.DataItem Item = New dataitem("<Null>","")But in this case the output value is an empty string. I'm afraid calculating to a Null is not possible.
P.S.
You do not need a ListToDataItemList activity. The GetCodedValueDomain activity can output to a DataItemList directly.0 -
Thank you so much! I've been working at this all day, and thanks to another post, I successfully used the InsertIntoList activity using New DataItem("<Null>", nothing).
Then, in my RuntimeModifications, when I'm assigning the default value to my combobox, I have to use an If activity to account for when the existing attribute value is Null.
Originally, I wasn't using the ListToDataItemList activity, but the Help for GetCodedValueDomain suggests to use it, but I think I'll clean up my workflow to not include it.0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer