soundsessential Posted November 11, 2018 Posted November 11, 2018 Hey folks Is it possible, after having executed the request and having the results in a variable, to count how many returned records there were? I'm doing this with the online plugin using GetFirstFieldValue and setting the field name to be "CountResult". Is something similar possible with the desktop plugin? Many thanks
soundsessential Posted November 11, 2018 Author Posted November 11, 2018 Managed to figure out one way: PatternCount ( PCQB_SGetXML( "Response" ; "" ) ; "<AccountRet>" ) Couldn't figure out how to add the MetaDataOnly attribute to the request and then pull the retCount from that. Said the attribute wasn't valid and I couldn't find any examples. Any tips in this regard would be appreciated. Thanks again.
PCIPal Posted November 12, 2018 Posted November 12, 2018 Hi soundsessential, You can set the "metaData" attribute in the request and look for the retCount attribute in the response. Here is an example for Customer Query. PCQB_RqNew("CustomerQuery" ; "metaData=MetaDataOnly" ); PCQB_BeginSession(); PCQB_RqExecute(); PCQB_RsGetResponseAttribute( "retCount" ); Also, you should be using the latest version 11.0.0.1 of the FM Books Connector plug-in. There were bugs on setting the attributes in a request in version 10 and 11.0.0.0 of the plug-in. I've tested the confirmed that it is working on 11.0.0.1 of the plug-in. Sincerely, Carson
soundsessential Posted November 13, 2018 Author Posted November 13, 2018 This is super helpful. Thanks very much.
Recommended Posts
This topic is 2561 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now