cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Default Value to sap.ui.comp.smartfield.SmartField

saritaagrawal59
Explorer
0 Kudos
114

Hello Expert,

We have a requirement to add the row to the table with the smart field as f4help and prepoluted values.

the data is coming from the backend, as we are adding the row from the controller in for loop with the filters.

to set the values to smartfield, we have used,

smartfield.setValue() >> not working 

also

new sap.ui.comp.smartfield.SmartField({
                                        value: {
                                            path: "Part",
                                            value: oresponse.results[i].Part,
                                        },
                                        entitySet: "Items",
                                        textInEditModeSource: "ValueList",
})
which is also not working.
in the debugger, it is showing the value but in the app preview, the field is blank.
 
Can anyone suggest ?
 
thanks
SaritaUntitled.png
View Entire Topic
junwu
Active Contributor
0 Kudos

I think smartfield only works with no name model, if I am not wrong.