Skip to Content
0
Apr 18, 2018 at 09:29 AM

SmartField dependency filter

1449 Views

I have the following scenario:

A form binded to an entityset, I'm using annotations and have some smartFields.

The fields have their valueHelp binded to an getEntity. The thing is that I need to pass some custom filters to my smartField after they fill some of the inputs, like when you filter a list :

var oFilter = new Filter({ path: "...", operator: FilterOperator.EQ, value1: '....'});

var oBindings = sap.ui.getCore().byId(".......").getBinding("items"); 
oBindings.filter([oFilter]);
This is how I bind my form:
sap.ui.getCore().byId("form").bindElement("/TestSet('00')");

And my view:

<smartField:SmartField id="iSelectMotivo" value="{MotivoCrm}">
     <smartField:configuration>
        <smartField:Configuration controlType="input" displayBehaviour="idAndDescription"/>
     </smartField:configuration>
</smartField:SmartField>

Any tips how can I archive this?


(Similar question https://answers.sap.com/questions/32849/pass-filter-to-value-help-of-smartfield.html
none answerd, 1 year ago)

Thx in advance.