cancel
Showing results for 
Search instead for 
Did you mean: 

XML Binding to an expand Table

Former Member
0 Kudos

Hi,

I have ceated a table, which holds the data of a collection.

Maped like <Table width="95%"  items="{path: '/PARTNERCollection' , parameters:{expand : 'PARTNER_ADDRESS'}}"


Within the Exapand PARTNER_ADDRESS I have got a table with only one record.

I want to map ONE entry to one of the tables column like:


<Text text="{/PARTNER_ADDRESS/results/0/TELEPHONETEL}" />


which is not working....


Whats wrong?


Thanks

jens

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kartik,

no, ist not working.

Found a solution:

Insert a "dummy" element, e.g.

<l:HorizontalLayout content="{PARTNER_ADDRESS}">

     <Label text="{STREET}"></Label>

</l:HorizontalLayout>


The reason is, that OData Models does not support indexed array.


Jens

former_member182372
Active Contributor
0 Kudos

Referencing entry by index is possible only in jsonmodel, in odatamodel - only by key

Former Member
0 Kudos

Ok, so how to I address the filed in

PARTNER_ADDRESS/results/0/CITY?

I tried <Text text="{PARTNER_ADDRESS/0/CITY}" /> which ist no working,

Also <Text text="{PARTNER_ADDRESS['0']CITY}" />

or

<Text text="{PARTNER_ADDRESS/results/0/CITY}" />

and all other combinations 😞

Jens

former_member182372
Active Contributor
0 Kudos

is that Text inside the table?

if so you can just do "PARTNER_ADDRESS/CITY"

former_member182372
Active Contributor
0 Kudos

post a table and text XMLs

Former Member
0 Kudos

See example below.

PARTNEE_ADDRESS is a table with [1..n] entries.

I want to display always the first entry.

PARTNER_ADDRESS/0/CITY does not work 😞

Also ARTNER_ADDRESS/results/0/CITY  and all combinations ....

Jens

former_member182372
Active Contributor
0 Kudos

and one more time:


Referencing entry by index is possible only in jsonmodel, in odatamodel - only by key


and


post a table and text XMLs

karthikarjun
Active Contributor
0 Kudos

will this help?  JS Bin - Collaborative JavaScript Debugging

  <Text text="{/PARTNER_ADDRESS/0/CITY}" />


Thanks,

KA