Skip to content

A Syteline script to build an SQL filter string for Custom Load Methods, from users' FilterInPlace entries, based on the vendor script GenerateFilterStringXML.

License

Notifications You must be signed in to change notification settings

functionaldevices-cis/GenerateFilterStringSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

GenerateFilterStringSQL

Background

Sometimes we need Custom Load Methods to generate the data that drive forms, but we still want the end users to be able to use FilterInPlace mode. To do this, we have to assemble the user's FilterInPlace entries, and pass that data to the Custom Load Method. Infor does this using the vendor script GenerateFilterStringXML, but it creates an XML format that doesn't match the SQL format that you'd find if you just look at ThisForm.PrimaryIDOCollection.Filter.

Example:

Say you were on a form dealing with items, and you filtered the Item property to "MyBlueCar".

  • ThisForm.PrimaryIDOCollection.Filter will give: Item = N'MyBlueCar'
  • GenerateFilterStringXML will give: <FilterString><Item><Property>Item</Property><Operator>=</Operator><Value>MyBlueCar</Value><DataType>CHAR</DataType><DataLength>30</DataLength></Item></FilterString>.
  • GenerateFilterStringSQL will give: Item = N'MyBlueCar'

Additional background discussion is available on the Syteline User Network forums here.

How to Use

Add this as a C# global Script in the Scripts menu in Design mode, and then trigger on your form from the StdFormFilterInPlaceExecute event. For an example of how to do this, look at the Resources form, which uses GenerateFilterStringXML.

About

A Syteline script to build an SQL filter string for Custom Load Methods, from users' FilterInPlace entries, based on the vendor script GenerateFilterStringXML.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages