Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

SOAP call Response sort based on linked table field

udays9774551
Level 1
Level 1

I have a requirement to sort based on a field from a linked table in the output of a soap call(wsdl). I am using queryDef ExecuteQuery method.

 

This field is available in Table C. Table C is linked to Table B and Table B is linked to Table A. We are using Table A to query in Soap call.

We are able to order with the field available in Table A but how to order the results based on the field available in Table C.

 

Please let me know if you any idea. Thank you in advance.

 

Regards,

Uday Sakhre

Adobe Campaign Classic Adobe Campaign Standard SOAPUI
1 Accepted Solution
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

 

Use <orderBy/> on the field, e.g.:

<orderBy>
  <node expr="[tableA/tableB/tableC/@sortField]"/>
</orderBy>

 

The tables will have to have their relations already defined in schema def.

 

Thanks,

-Jon

View solution in original post

3 Replies
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

 

Use <orderBy/> on the field, e.g.:

<orderBy>
  <node expr="[tableA/tableB/tableC/@sortField]"/>
</orderBy>

 

The tables will have to have their relations already defined in schema def.

 

Thanks,

-Jon

View solution in original post

udays9774551
Level 1
Level 1

Thanks Jon for the update. But with this approach, getting PostgreSQL error: column s0.sortField does not exist.

This approach will work if the link is defined in Table A.

But here

Link is defined in table C to link table B.

Link is defined in table B to link table A. And

No link defined in Table A.

 

Thanks,

Uday

wodnicki
Community Advisor
Community Advisor
In the definitions also specify the reverse link, i.e. revLink, will work fine. Replace @sortField here with the col you want to sort by.