79422033

Date: 2025-02-07 20:00:58
Score: 1
Natty:
Report link

I think you would need to pass the union call as an argument to a subselect which Guidewire says is not allowed:

Note: You cannot use the union method on query objects passed as arguments to the subselect method.

https://docs.guidewire.com/cloud/pc/202411/integration/integration/topics/querybuilderapi/c_ba3266101.html

This might be one of those fun instances that does not have a way to accomplish strictly using a query API call. It certainly would not be as efficient, but you could do both queries and then determine if 2 or more results were returned in gosu code since you are coding it in gosu anyway.

What do you use the results for? Is this a query that you run, get the results, and then take some other action outside of PC? If optimal performance is not important, I would just write this with a combination of query API calls and gosu code and not worry about recreating this SQL query exactly using a query API call.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: SteveDripps