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
jge  
#1 Posted : Wednesday, August 6, 2014 1:13:50 PM(UTC)
jge

Rank: Advanced Member

Groups: Registered
Joined: 7/31/2014(UTC)
Posts: 40
Location: sterling, VA

Since limited screen space, I created subpage to show other fields in same table. So I created action on label to goto subpage. See attached.
However, the subpage always show first record contents, not got the correspondent record. I know I missed some command here, but just do not know which command I should use here to point to correspondent records. Please help.
jge attached the following image(s):
onlabel.jpg
bbv  
#2 Posted : Wednesday, August 6, 2014 2:12:11 PM(UTC)
bbv

Rank: Administration

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

Was thanked: 88 time(s) in 88 post(s)
Unfortunately our documentation is very lacking here - but we are working on it:

You go to your SubPage and create a new Page Source as a "new, empty XML". You add there a root element and child attributes or elements which you want to display. Then, in your Go to Subpage action, you map the current row to the root element in the Sub Page.

This concept allows you to use the same Sub Page for editing of different trees from the parent page, even those where elements and attributes are different to those from Sub Page.

In future we also might be able to do it easier without a requirement for an own Sub Page tree, if your Sub Page was not meant for reuse, but currently this is the way to go.
Jan Novak  
#3 Posted : Friday, December 4, 2015 2:08:57 PM(UTC)
Jan Novak

Rank: Newbie

Groups: Registered
Joined: 12/3/2015(UTC)
Posts: 1
Wallis And Futuna Islands

Originally Posted by: bbv Go to Quoted Post
Unfortunately our documentation is very lacking here - but we are working on it:

You go to your SubPage and create a new Page Source as a "new, empty XML". You add there a root element and child attributes or elements which you want to display. Then, in your Go to Subpage action, you map the current row to the root element in the Sub Page.

This concept allows you to use the same Sub Page for editing of different trees from the parent page, even those where elements and attributes are different to those from Sub Page.

In future we also might be able to do it easier without a requirement for an own Sub Page tree, if your Sub Page was not meant for reuse, but currently this is the way to go.



Hello,
I'm dealing with similar situation now - my datasource is a MS SQL table.
How should I make a right mapping between the datasource of toppage and the datasource of the subpage to show toppage's selected record on subpage? I'm getting the first record of the table always now.

The solution mentioned here http://support.mobiletog...100000111#post1100000309 works for me. But I think the mapping could prevent a loading of all records because of one record.

Thanks.


Jan Novak attached the following image(s):
datamapping.png
AFC  
#4 Posted : Friday, December 4, 2015 5:47:55 PM(UTC)
AFC

Rank: Administration

Groups: Registered, Administrators
Joined: 9/15/2014(UTC)
Posts: 140
Austria

Was thanked: 18 time(s) in 18 post(s)
Hi Jan!

Without knowing your sample - are you sure you need a mapping at all?

In case you just want to show a distinct row of your table, you can also do the following:
Reuse the same Page source on toppage and subpage (the tree is really shared as long as you don’t use the option “Load Data|On Every page”, so no new loading of all records is done when entering the subpage)
When clicking the button, label or whatever control enters the subpage, save your unique row-key in a second tree before.
You can do this by using an “Update Node” action like:
Update Node(s): $CURRENTLY-EDITING/Root/@edit-id
with Result of: @id

In the subpage, you can select the wanted row by using that @edit-id as constraint.
E.g. you can define a repeatable table with following “Create for each item in” XPath setting:
$DB2/DB/RowSet/Row[ @id = $CURRENTLY-EDITING/Root/@edit-id]

Or if you don’t want to create a table but just a Label, you can set its text by using a similar XPath
$DB2/DB/RowSet/Row[ @id = $CURRENTLY-EDITING/Root/@edit-id ]/@Firma

If you do not only want to show but also edit your row data, you can also copy the row to a different tree (using an “Append Node(s)” action) and modify that one.
In the subpage, the second tree is modified. If editing should be cancelled, you simply throw it away; in case of saving, you can write back the data to the original row after closing the subpage.

Hope this helps.

Altova MobileTogether Experts
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.