Support Forum

Ask questions and get help from MobileTogether experts.
MobileTogether Product Information
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Robert  
#1 Posted : Saturday, April 11, 2015 4:33:15 PM(UTC)
Robert

Rank: Newbie

Groups: Registered
Joined: 4/11/2015(UTC)
Posts: 2
Netherlands

Thanks: 1 times
Hi All,

I have a top page called 'Customers' and a sub page called 'Orders'. On the page Customers I have a table which contains all customers in the 'Customers.xml' XML file. The orders page contains a table with all the orders in the 'orders.xml' XML file. When you click on a customer in the table you go to the orders page. As you can imagine I only want the orders of that specific customer to be shown. I just can't seem to get it right using the subpage data mapping dialog screen.

Both files contain the field 'Customer_obj' which is the unique ID for a customer.

Below you see the structure of both files.

Any help is welcome!

Customer XML:
<?xml version="1.0"?>
<ttCustomer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ttCustomerRow>
<_iLine>2</_iLine>
<_Company_obj>19538094.029</_Company_obj>
<_RecordValue/>
<Customer-sbm_Customer>0x00000000000b6e44</Customer-sbm_Customer>
<CustAddressCity>Oslo</CustAddressCity>
<CustAddrHouseNr>10</CustAddrHouseNr>
<CustAddrHouseNrExt/>
<CustAddrName>Norsk Fashion</CustAddrName>
<CustAddrNameExtra/>
<CustAddrStreet>Gamler Gade</CustAddrStreet>
<CustAddrZipCode>1000</CustAddrZipCode>
<CustCountryDescr>Norway</CustCountryDescr>
<CustEmail/>
<CustPhone/>
<CustomerCode>10000</CustomerCode>
<Customer_obj>20679145.029</Customer_obj>
</ttCustomerRow>

Order XML
<?xml version="1.0"?>
<ttOrderLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ttOrderLineRow>
<_iLine>1</_iLine>
<_Company_obj>19538094.029</_Company_obj>
<_RecordValue/>
<OrderLine-sbt_OrderLine>0x000000000003e3b2</OrderLine-sbt_OrderLine>
<Customer_obj>21600619.029</Customer_obj>
<OrderDate>2015-04-03</OrderDate>
<OrderNr>561</OrderNr>
<OrderedAmt>49.38</OrderedAmt>
<OrderLine_obj>24622590.029</OrderLine_obj>
<CurrencyIsoCode>EUR</CurrencyIsoCode>
</ttOrderLineRow>
bbv  
#2 Posted : Saturday, April 11, 2015 5:12:00 PM(UTC)
bbv

Rank: Administration

Groups: Registered, Administrators
Joined: 7/21/2014(UTC)
Posts: 484

Was thanked: 81 time(s) in 81 post(s)
A subpage mapping would be an overkill for this task. The easiest method for me is to save the current Customer_obj value before going to the subpage and use the Visibility property on the sub page to only show those orders which correspond to the selected customer

I've attached sample XML files and the design file.


Altova MobileTogether Experts
File Attachment(s):
Customer.xml (2kb) downloaded 82 time(s).
Order.xml (1kb) downloaded 82 time(s).
Customers and Orders.mtd (10kb) downloaded 85 time(s).
thanks 1 user thanked bbv for this useful post.
Robert on 4/11/2015(UTC)
Robert  
#3 Posted : Saturday, April 11, 2015 6:31:57 PM(UTC)
Robert

Rank: Newbie

Groups: Registered
Joined: 4/11/2015(UTC)
Posts: 2
Netherlands

Thanks: 1 times
Thanks! It works perfect!
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.