Ok, I think I have some idea of what the code should look like, but I don't know how to write it. Can you take a look at my idea below and let me know if I'm on the right track?
The JS code I should add to the MTIdLabel should be something like this:
service.execute({
and in here I indicate that it's the "Messages Query Service" that I want to execute, that I want it to execute upon success of the "MessageThreads Query Service", and that the request parameter I want to use is that the MessageThreadId is equal to "value"
})
should I be using this sort of code?
service.execute({
data: {
success: function(data, MYPARAMETER) { ... }
}
})
The order is,
1) Runs MessageThreads Query
2) Response to Query puts MessageThreadId in an invisible label called MTIdLabel.
3) MTIdLabel has JS code that does what I just tried to describe above, executes Messages query
4) Response of the Messages query has a response parameter mapped to a visible label on the same list item called Last Message. Here I need to add JS code that looks for every Mobile List item where the id in the hidden label "MTIdLabel" matches the MessageThreadId on the row from the Messages table?
I think I have the right idea? Just need some help with the JS code. Any help is much appreciated!