SOAP call Response sort based on linked table field | Community
Skip to main content
Level 2
April 8, 2020
Solved

SOAP call Response sort based on linked table field

  • April 8, 2020
  • 1 reply
  • 4832 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

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

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
April 8, 2020

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

Level 2
April 9, 2020

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