selectQuery SOAP API call does not seem to like formula fiel

Posted by mopfer on 26-Dec-2013 17:12

Most of the things I've used the selectQuery SOAP API call for so far work OK, but I've run into a snag with formula fields.  I get a SOAP fault error (11506) that says:

SOAP faultstring is: Error runnig query SELECT field1, field2, field3 FROM table1 (11506)

Trial and error let me narrow down the fields that would and wouldn't work, and the only time I get the error with this query is if I include a formula field in the list.  Should I expect to be able to read formula fields in selectQuery?

All Replies

Posted by Bill Wood on 26-Dec-2013 19:42

I have been playing with selectQuery API and noticed that it seems to rely on the underlying Object's support for SQL. This seems to be for retrieval efficiency as the Rollbase engine can rely on the SQL access I the data store. The disadvantage is that you only get fields that are mapped to SQL storage - I would think that Formula Fields would not satisfy that constraint because Rollbase would have to intercept every result row and perform a calculation.

What I also found is that getPage seems to work for the cases where selectQuery didn't work for me. You need to pass in a view ID and the result is what would show on a page. I did not try it with Formula Fields but my experience would suggest it should get those. =

Posted by mopfer on 27-Dec-2013 09:08

Thanks for the information.  getPage isn't available from the SOAP API, and the documentation for SOAP getDataObj specifically says that it won't return template or formula fields, but I'll try some of the other calls and see if there is one that can handle formulas.

Posted by mopfer on 27-Dec-2013 11:06

It looks like SOAP getDataField will work, although I had to use a LONGCHAR as the output parameter in the call instead of the DATASET that the WSDL analyzer said to use in order to get any results from the call.  

It would be nicer if selectQuery handled formula fields, as I'll be making four API calls to get the values from three formula fields instead of just one call, but the values can be accessed this way.

Posted by Bill Wood on 29-Dec-2013 15:03

wrt

getPage isn't available from the SOAP API


I did verify this, and talked to some of the Rollbase developers and they feel that adding this to the SOAP API is a reasonable enhancement, and they will look into this in an upcoming release.

\

Posted by mopfer on 30-Dec-2013 09:35

That sounds good.  Thanks for letting me know.

This thread is closed