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
wolfgang  
#1 Posted : Tuesday, August 25, 2015 11:18:47 AM(UTC)
wolfgang

Rank: Advanced Member

Groups: Registered
Joined: 6/23/2015(UTC)
Posts: 59
Germany

Thanks: 5 times
Within a control action I want to iterate over elements to save and mark them as "saved" at once. The Loop action seemed to be suitable but it doesn't allow modifications to the sequence beeing iterated. What's best approach to solve this? Thanks for any hints.
bbv  
#2 Posted : Tuesday, August 25, 2015 1:23:18 PM(UTC)
bbv

Rank: Administration

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

Was thanked: 88 time(s) in 88 post(s)
I would use a single Update Node(s) call instead - will be much quicker.
wolfgang  
#3 Posted : Tuesday, August 25, 2015 2:10:01 PM(UTC)
wolfgang

Rank: Advanced Member

Groups: Registered
Joined: 6/23/2015(UTC)
Posts: 59
Germany

Thanks: 5 times
Thanks for reply. Can you give some more details please. I'm using the loop action to save any selected nodes. HTTP:success within the loop would be the right place to update a node, but this isn't allowed. Where would you place the mentioned Update Node(s).
bbv  
#4 Posted : Wednesday, August 26, 2015 10:21:55 AM(UTC)
bbv

Rank: Administration

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

Was thanked: 88 time(s) in 88 post(s)
My suggestion with Update Node was a guess, because you didn't provide any details on what you are doing. If you have a HTTP action within the Loop, then you must use the Loop indeed.

You have now two possbilities:

  1. You build the loop with count, for example: Variable $i, For Each 1 to count( $MyTree/Root/Nodes ). In this case the sequence used in the loop is built with numbers - not source tree, and the source tree can be updated. You would access each node of the source tree with $MyTree/Root/Nodes[ $i ]
  2. You use an indepent tree to set the status and after the Loop you use this tree to Update Nodes in the actual tree
thanks 1 user thanked bbv for this useful post.
wolfgang on 8/26/2015(UTC)
wolfgang  
#5 Posted : Wednesday, August 26, 2015 8:33:16 PM(UTC)
wolfgang

Rank: Advanced Member

Groups: Registered
Joined: 6/23/2015(UTC)
Posts: 59
Germany

Thanks: 5 times
First suggested loop solution looks smart and works without overhead. Many thanks.
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.