Evaluate Resultset

I need some help understanding how to evaluate a resultset on a branch step.

Example:

  1. using a JDBC Select Adapter to retreive items (resultSet is itemsOutput)

  2. LOOP over ‘/itemsOutput/resultSet’

  3. BRANCH (evaluate = TRUE)

  4. %itemsOutput/resultSet/item_type% = ‘FG’:SEQUENCE (doesn’t work)

    %itemsOutput/resultSet[0]/item_type% = ‘FG’:SEQUENCE (does work)

Issue: How do you evaluate on an particular field in a resultSet from a Select statement? Or how do you use a variable to determine the resultSet index? Do you really have to store this field off to another variable to use in the evaluate step?

Any help would be appreciated.

Thanks.

Hmmm… the structure you have said you followed should work just fine - I have a bunch of services that do exactly that. As long as you loop over resultSet, then the label expression will evaluate against the current element of the array over which you are looping.

Is all your nesting correct (Seq under Branch, Branch under Loop)?

Thanks for the reply.
Yes, all the alignments are correct. The only difference is the index specification which makes the statement evaluate to true.

Have you tried this?

LOOP over ‘/itemsOutput/resultSet’
…BRANCH on /itemsOutput/resultSet/item_type (evaluate = FALSE)
…FG:SEQUENCE
…$default:SEQUENCE