Skip to Content
0
Jun 05, 2020 at 06:59 PM

how to use expressions in "select entity set" of a view in sapui5

104 Views

I have a detail page of a record of an entity HC_LYDOFIC one of the fields of that entity is the foreign key to an entity HC_SEDESCOM.

I am trying to do the following:

When I open the detail of the first entity I can see the information of that HC_LYDOFIC record and the information of the fields of the entity HC_SEDESCOM.

In mdk this QueryOption can be used in a container control of a keyvalue, where '{{#Property: PERNR_EMI}}' refers to the foreign key of the first entity "HC_LYDOFIC" and "$ filter = PERNR_EMI" is the filter that use in the target with the second entity "HC_SEDESCOM" and it works:

$filter=PERNR_EMI eq '{{#Property:PERNR_EMI}}'

but i don't know how to do the same in sapui5 with an XML view.

<sap.ui.layout.form:FormElement id="element4" fields="{path:'/SEDESCOM',filters:[{path:'ID_SEDE',operator:'EQ',value1:' foreign key value '}]}"> 
   <sap.ui.layout.form:fields>
	<Text xmlns="sap.m" text="{NOM_SEDE}" id="text0"/>
   </sap.ui.layout.form:fields>
   <sap.ui.layout.form:label>
	<Label text="Nombre de la sede" id="label3"/>
   </sap.ui.layout.form:label>
</sap.ui.layout.form:FormElement>

I know that MDK and SAPUI5 are not the same, but I want to do something similar to the MDK example.

how can I do it?

Greetings from Colombia

Attachments

m4ssm.png (71.8 kB)
hfggq.png (54.3 kB)