January 27, 200322 yr Platform: E-mac G4 System: 10.2.3 Server: Apache 1.3 Database: FileMaker6 Unlimited Lasso: Version 6 Question: How do you allow a browser to choose a search operator on a field and have it operate on that field in an inline search (in a different format file), preferably in Strict Lasso 6? The <select name="Operator"> <option value="eq">equals</option> etc
January 28, 200322 yr It's all to do with the order in which Lasso processes stuff you may have to look at your approach to this........ have a look into processing an output tag..... info about process and output tags can be found in the LDML reference that comes with Lasso NB don't forget those escape chars ( ) have a go NB I would recommend setting variables with the user's search choices and putting those in the output tag.
February 4, 200322 yr Author Thank you for your reply. I think I've found every possible way of not making it work, but being new to Lasso I've learnt a bit in the process. I couldn't get any joy from [Output] or [Process] tags, even though I could make a variable of the combined operator and FieldNames, which was quite a lot further than I had managed before: [Variable: 'CombinedVariableName' =''] [Variable: 'CombinedVariableName' = (Output: '-Operator='', $OperatorNameVariableName, Output: '', ', Output: ''FieldName'='', $FieldNameVariableName, Output: ''')] However, whatever I did I just couldn't seem to get it to fire up in the [inline], though I would have thought that: [Process: (Variable: 'ComBinedVariableName')] would have worked. However I finally found a way and I've included the notes to myself below for anyone in the same situation that I was: Make the Search format file into an HTML Form, using standard <Form Action="resultsfile.lasso", Method="post"> action, and insert HTML Operator value lists, giving each a distinctive name, eg: <select name="Op1"> <option value=""selected>- Select -</option> <option value="cn">Contains</option> <option value="eq">Equals</option> </select> ...coming directly before the field the operator is to operate on: <input type="text" name="FieldName" value="" size=40> Use an input button such as: <Input type="Submit" name="-Nothing" value="Start Search"> The 'name="-Nothing"' stops Lasso trying to perform any actions, such as trying to find fields with the names given to the operators. In the Results format file, start by making variables of the field operator and its contents by using : <?LassoScript Local: 'OperatorNameVariableName'= 0; $OperatorNameVariableName=(Action_Param:'OperatorName'); ?> <?LassoScript Local: 'FieldNameVariableName'= 0; $FieldNameVariableName=(Action_Param:'FieldName'); ?> although 'Variable' can be used instead of 'Local'. (The first line is a precaution.) The Search criteria is inserted directly into the [inline]: [inLine: -Search, -Database='DatabaseName', -Table='TableName, -Operator=(Variable: 'OperatorVariableName'), 'FieldName' = (Variable: 'FieldVariableName'), etc with all the remaining Operator/Fields, the other [inLine] requirements and the usual outs or messages if not records are found, and the records themselves are then sandwiched between [Records][/Records] tags before the final [/inLine]. Did I miss something, or is there nothing in the tutorial literature that explains this?
February 7, 200322 yr RE: [Process: (Variable: 'ComBinedVariableName')] u dont need to process this.... you want to process the inline with the vars (ie the search criteria) added....... one to think about
Create an account or sign in to comment