问题
I have a value help field and want to see only descriptions (not codes) in the dropdown. After selection, want to store the code in another field which would be in hidden mode. For this, I have defined the following annotation:
<Annotations Target="Metadata.CallReport/DivisionText">
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="CollectionPath" String="CustomizingDivisionSet" />
<PropertyValue Property="Parameters">
<Collection>
<Record Type="Common.ValueListParameterOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="DivisionText" />
<PropertyValue Property="ValueListProperty" String="Text" />
</Record>
<Record Type="Common.ValueListParameterOut">
<PropertyValue Property="LocalDataProperty" PropertyPath="Division" />
<PropertyValue Property="ValueListProperty" String="Value" />
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="SearchSupported" Bool="false" />
</Record>
</Annotation>
</Annotations>
And the view definition..
<!-- ... -->
<smartField:SmartField textLabel="Division" value="{DivisionText}">
<smartField:configuration>
<smartField:Configuration controlType="dropDownList" displayBehaviour="descriptionOnly" />
</smartField:configuration>
</smartField:SmartField>
<!-- ... -->
Everything works fine; the code for the description I have selected is copied to Division
field. However, when I change this dropdown field, the selection works, but the code does not get copied to Division
field.
来源:https://stackoverflow.com/questions/57980346/smartfield-annotation-valuehelp-dropdown