Skip to Content

Smart Field Value Help

Hello,

I have a smart field in my UI5 application which has value help which returns Key and Description. When using the F4 help the smart field gets updated with the chosen value say (key field). I have created a normal input field which needs to be updated with the description of the input selected by user.

How can I achieve this as I do not find any control over the OK button of the value help attached to the smart field.

Thanks,

Kabir

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 06 at 09:16 AM

    You can try the below code.

    in View

    <form:content>

    <smartField:SmartLabel labelFor="idPrice"/>

    <smartField:SmartField value="{Price}" id="idPrice" change="onSelect"/>

    <Input id="input" editable="false"/>

    </form:content>

    In Controller

    onSelect: function(evt){

    var oView = this.getView();

    var pri = evt.getParameter("value");

    oView.byId("input").setValue(pri);

    }

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 06 at 08:45 AM

    Hello,

    did you try with change event on SmartField?

    Regards,

    Sagarika.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 08 at 10:33 PM

    Thanks for the response Sagarika.

    The following annotation in my ABAP CDS view helped.

    ObjectModel.updateEnabled: true

    Regards,

    Kabir

    Add comment
    10|10000 characters needed characters exceeded