cancel
Showing results for 
Search instead for 
Did you mean: 

xMII Frustration, trying to hold " SAP xMII XML format" in variable

Former Member
0 Kudos

I have two queries that return the same result (same columns, different rows). I'm running one or the other based on a condition. I want to assign the result to something so that I can run a repeater against it after (one of the two) queries has run.


                     Cond   ....      3rd leg(After condition)
                    /                          
             Query 1    Query 2       Repeater
            

Accepted Solutions (0)

Answers (2)

Answers (2)

jcgood25
Active Contributor
0 Kudos

Paul,

If your two queries (different Query Templates?) both return the exact same columns, but just different rows, wouldn't it make more sense to just have a single Query action block instead of a conditional branch? This way your Repeater logic could just work directly on the single query results and you wouldn't have to map or copy any xml objects around.

You could use the stringif function in the expression editor to handle the specifics of your current Query1 and Query2, even adjusting the QueryTemplate property of the action block itself if necessary. The effective use of query parameters and/or the template(s) themselves should make this quite possible and streamlined in your logic flow.

Regards,

Jeremy

Former Member
0 Kudos

Thanks Jeremy,

That's what I'll do.

Former Member
0 Kudos

Create a local parameter of type "XML" (in the BLS workbench menu). Use an "Assign XML" link to copy the output from the query that you executed to:

Local.YourParameter

That's all you need to do!

You can then use the Local parameter as the input to your Repeater...

Rick

Former Member
0 Kudos

Rick,

This is what I tried to do. But it seemed like it was trying to take my XML and convert it into a row of a new result set rather than leaving it as a result set. That's why it was frustrating me... It should have worked like you said, but it wasn't

0 Kudos

Paul,

Make sure that the XML assign did not include any of the XPath otherwise it will not assign the entire XML. For example if you have a SQL Query called IllumSQLQuery.Results is assigned to your Local XML property. Hope this helps.

Sam