cancel
Showing results for 
Search instead for 
Did you mean: 

Show domain short text in input field

Former Member
0 Kudos

Hi,

How do i show the short text of a domain value instead of the Fix value key in an input field.

Thanks.

Regards,

Morten

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for all replies

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Consider using a DropDownByKey instead of an InputField. The DDLB will automatically show the value text instead of the value key (yet contain the key in the bound context attribute). The inputField on the other hand will always only display whatever value is contained in the bound context attribute.

Former Member
0 Kudos

Hi Thomas,

Thanks for your reply.

Yes i am aware that the functionality is given by the DropDownByKey. My problem is that the fields are build runtime by a dynamic customizing table. This table does not contain the option to create other than InputFields at present time. A solution could be to extend this table with the option to select UI element type (InputField, DropDownByKey etc.) Before implementing this I was looking for a more simple solution. Do you see any?

Thanks,

Regards,

Morten

Madhu2004
Active Contributor
0 Kudos

other option is to to code in modifyview, retrieve the domain fixed value text for the key entered and bind the value to the same field

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> other option is to to code in modifyview, retrieve the domain fixed value text for the key entered and bind the value to the same field

Keep in mind that if you do so, you are overwriting the key value in the attribute. When you save this data back to the underlying data object you would have to change back from the text to the key. Keep in mind that the text doesn't necessarily mean you have a 1:1 match with the key. It is possible to have 2 or more keys with the same text description. You must be careful taking this approach.

Instead you might consider displaying the text in a separate field next to the inputField. The problem is that the text won't update until the next server event. This can mean the text is out of sync with the value in the inputField.

Best approach from a usability standpoint for the end user is a DDLB.