Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Counting the number of returned results

Featured Replies

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

  • Author

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.

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

  • Author

This is super helpful. Thanks very much.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.