Unable Posted September 2, 2003 Posted September 2, 2003 Exploring the -LOP Tag's values More pedantry. Developed in FMPro 5.0v.3, latest WC updaters. Tested on IE 5.1 and NN 7.0. Unstuff. Place the files from this folder loose in your folder WEB. Create a new record in Web Security.fp5 for all users with the permission Browse. Make sure web companion is enabled. I use the URL http://localhost/default.htm. If you are using something other than port 80, you may need to edit the format files and the URL accordingly. For NEWBIES. In addition to the -LOP values, this demonstration uses the "field contents match" restriction in a find, and the text which is displayed on two pages (of four) is controlled with [FMP-If] conditionals. It also uses a dynamic valuelist (i.e. based on the contents of a field), which ges special comments. Also involved are -max, -sortfield, -sortorder, -token and a few other tags. andor.zip
Unable Posted September 2, 2003 Author Posted September 2, 2003 Here is a very useful observation from Garry Claridge. There is code in the demonstration which reads: <select name="hobby=="> <option value="">Select Item</option> [FMP-ValueList: hobby, List=hobbies] <option value="[FMP-ValueListItem]">[FMP-ValueListItem]</option> [/FMP-ValueList] </select> If the field represented by that code is not selected then a request will be made where == is entered into the field. Also there is code in the demonstration (on the same format file, mars.htm) which reads: <select name="hobby"> <option value="">Select Item</option> [FMP-ValueList: hobby, List=hobbies] <option value="==[FMP-ValueListItem]">[FMP-ValueListItem]</option> [/FMP-ValueList] </select> If the field represented by that code is not selected then no request is made on that field. The gist of this is that if one uses the latter code (entry of the symbol with the ValueListItem in the definition of the option value) then the find of several fields can be done with the -LOP value AND, and with only some selections being made the find will be successful. Whereas if one uses the former code above then the -LOP value OR is required since a find on == will return no records, which without the -LOP value OR would return an error even if another field had appropriate search criteria entered. I was mixing metaphors to demonstrate two different code sturctures and missed that. It is best to not mix metaphors. Thanks Garry. Maybe this helps explain why
Unable Posted September 2, 2003 Author Posted September 2, 2003 In light of Garry's observation I have re-written the format files to use a consistency of code for the -find action on mars.htm and with adjusted commentary throughout. The attached folder contains only format files. If you have the first demonstration you can substitute these format files with those of the original demo if you so desire. formats.zip
Recommended Posts