Plug-ins > FM Books Connector

ItemQuery using NameFilter Possible?


Greetings to all, I've been trying to use the ItemQuery with NameFilter as follows, Product SKU being a text field within the current record:  (Partial script below, Begin/End sessions in place).

SetVariable [ PCQB_RqNew ( "ItemQuery" ; "" ) ]
SetVariable [ PCQB_RqAddFieldWithValue ( "NameFilter" ; "Contains" ; Product SKU ) ]

On the second SetVariable, an error is returned as follows:

CODE: -1000
MESSAGE: Unable to parse attribute list. Ensure that attributes are properly formatted. Attributes (has 2 boxes here)b

The entire script does complete, but returns the entire Item List instead of the single expected record. Is this the correct function? Syntax issue? Seems to match the Intuit OSR). Does the NameFilter work with FMBooks?

Any help is GREATLYappreciated.

Mark D Kerr

I know it's probably a little ususual to post your own response, but...

The NameFilter needs to be passed as 2 function calls as follows...

SetVariable [ PCQB_RqNew ( "ItemQuery" ; "" ) ]
SetVariable [ PCQB_RqAddFieldWithValue ( "NameFilter::MatchCriterion" ; "Contains" ) ]
SetVariable [ PCQB_RqAddFieldWithValue ( "NameFilter::Name" ; Product_SKU ) ]

I feel safe in mentioning that the documentation REALLY needs some expansion into syntax and examples.

Enough said about that, the product works nice once you make the breakthrough.

Mark D Kerr
FM9 Certified Developer

Melinda DePalma:
Thank you for posting a response to your question as I am sure that will be very useful for future readers. We will be expanding the documentation to include additional syntax and examples and thank you for the recommendation as we do highly value customer feedback.  :)


[0] Message Index

Go to full version