Knowledge Base - Tutorial Interval search plugin for Sobi2

This plugin works with numerical, or date values. It is not possible to work  alphanumeric value.

Here are some examples of custom fields compatible with this plugin.

plugin_interval3

Basic case with values entered by the user. Warning, if the user can enter a textual value here, it may represent a risk that value will not be found.

Note: the value need to be a numeric value, or a least start with a number. Examples:

  • 100 -> ok
  • 200 -> ok
  • -120.45 -> Ok
  • 100€ -> ok
  • 200 $ -> ok
  • 2000 pieces -> ok
  • price $20 -> NOT OK
  • $100 -> NOT OK

plugin_interval4

The field calendar work for the date search. Beware, it is necessary to let the plugin date format is used by Sobi (must refer to the parameters for that).

plugin_interval5

Sobi use an internal date format, by default is 'y-mm-dd', and that give in sobi2 (calendar and entries): 1976-08-13. Unfortunally, mySql dont use the same formatting. The plugin cannot test all combinaisons with all users separators. For this reason, you need to enter here manually the date format in the mySql format. Samples:

  • "%Y-%m-%d" for 1976-08-13 for the sobi format y-mm-dd (default)
  • "%d.%m.%Y" for 13.08.1976 for a custom format dd.mm.y (european)

To check the format used by Sobi, go into the Configuration >> Registry Editor >> Section "calendar" >> value "date_format", then by using the plugin tab, choose the right format date. In Capture, the value of my Sobi is "dd.mm.y" and the value of the plugin "%d.%m.%Y".

WARNINGS:

  • All combinaisons are not supported by sobi2 !
  • The sql date format need to correspond exactely with your Sobi2 config. 
  • If you change the sobi2 date format, the existing entries dont change (you need to resave all existings entries).

plugin_interval5_1

The field type listbox works too, but be careful how to store values, because should always include an identification value that can be sort similar to the displayed value, as in the example below. Warning, if you change existing fields, the entries already created will not be updates (this is due to Sobi).

plugin_interval6

Applies To

All Products