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.

Featured Replies

Hi,

I'm working on a script to send Client invoices to QuickBooks.  In the Demo file the example script is named "Push Invoice to QB(FM16)"  The big difference in the scripting appears to be the PCQB_RqAddFieldWithValue script steps.  In the non (FM16) scripts these are done in a set variable script step.  For most of these the $$Result variable is ignored.  In the (FM16) scripts the PCQB_RqAddFieldWithValue is on it's own and not part of a set variable script step.

So is the main difference between the example scripts due to an update to the PCQB_RqAddFieldWithValue and other functions so that they return an error code that can be checked?

Thanks

Bruce Herbach

 

I can't speak to why the example scripts call the functions differently, but would guess that error checking is easier if you call the function within a Set Variable step. I'd be curious to know what conditions would return a non-zero value for that function call. Would it return a 1 or "!!ERROR!!" if the value you pass violates the length constraint of the specified element? Would it if you tried adding an element in the wrong sequence—ClassRef before CustomerRef, for example.

I don't know, and have only ever tested for an error in the result of a call to the PCQB_RqAddFieldWithValue function when working in another developer's solution, and then only because that already did so. Perhaps I never ran into an error in my integrations because I evaluate the values and trap for potential errors before making the function call.

If you end up testing whether a function returns something other than 0 when you deliberately violate a length constraint or put an element in the wrong place, please post that you did so and what you discovered.

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC 28105
704.814.6852

  • Author

Geoffrey,

Thanks.  If I have a chance to test it I will and will let you know. 

I was curious as to why someone thought it was important to name the scripts with FM16 in the name.  I guessed that they were written in an earlier version, still worked so didn't need an update.  A user/developer be ware kind of thing.

Bruce Herbach

 

I believe FM16 is when the ability to call a plug-in function as a script step first appeared, so probably that name was used to help users who opened the file with an earlier version of FMP understand why it was blank (or filled with <function missing> steps.)

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC 28105
704.814.6852

  • Author

So prior to FM16,  using the function in a Set Variable script step was required, but now I can use it either way.  Thanks for the history.  Very helpful. 

Bruce Herbach

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.