search operator and select multiple

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

search operator and select multiple

Lee Glickenhaus-2
I don't know why it's taken me so long to notice this but….

I have a select multiple field in my search form with a hidden -operator=cn so the search will find all records that contain a selected item

But… I noticed that when more than one item is selected, the FIRST item has a "contains" operator  and the SECOND has a "begins with"

Here are the action_params I get:

(pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
(pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))

As a result, if I search for more than one item, I get a "no results"

Lasso 8.6

Any thoughts?

Lee



#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Ke Carlton-3
-logicaloperator = 'or' maybe?


On 4 December 2013 20:01, Lee Glickenhaus <[hidden email]> wrote:

> I don't know why it's taken me so long to notice this but….
>
> I have a select multiple field in my search form with a hidden
> -operator=cn so the search will find all records that contain a selected
> item
>
> But… I noticed that when more than one item is selected, the FIRST item
> has a "contains" operator  and the SECOND has a "begins with"
>
> Here are the action_params I get:
>
> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>
> As a result, if I search for more than one item, I get a "no results"
>
> Lasso 8.6
>
> Any thoughts?
>
> Lee
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Lee Glickenhaus-2
yes-- that works but when all the other fields are taken into consideration, searches get very over-inclusive so I want to offer people a choice between OR and AND.  Or works fine, but AND is broken because of this strange situation.  I don't understand wht Lasso only applies to "contains"operator to the first selected item.
 



On Dec 4, 2013, at 3:31 PM, Ke Carlton <[hidden email]> wrote:

> -logicaloperator = 'or' maybe?
>
>
> On 4 December 2013 20:01, Lee Glickenhaus <[hidden email]> wrote:
>
>> I don't know why it's taken me so long to notice this but….
>>
>> I have a select multiple field in my search form with a hidden
>> -operator=cn so the search will find all records that contain a selected
>> item
>>
>> But… I noticed that when more than one item is selected, the FIRST item
>> has a "contains" operator  and the SECOND has a "begins with"
>>
>> Here are the action_params I get:
>>
>> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
>> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>>
>> As a result, if I search for more than one item, I get a "no results"
>>
>> Lasso 8.6
>>
>> Any thoughts?
>>
>> Lee
>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Ke Carlton-3
Perhaps go down the -sql route, or try -opbegin and -opends:

inline(-database = 'x',-table = 'y', 'this' = 'that', -opbegin = 'or',
'keywords'
= 'a', 'keywords' = 'b',-opend, -search);
     // it's been a long time since I've touch classic inlines.
/inline;

Depending on the datasource you may need to filter after retieving the rows.

Ke


On 4 December 2013 21:46, Lee Glickenhaus (lists) <[hidden email]> wrote:

> yes-- that works but when all the other fields are taken into
> consideration, searches get very over-inclusive so I want to offer people a
> choice between OR and AND.  Or works fine, but AND is broken because of
> this strange situation.  I don't understand wht Lasso only applies to
> "contains"operator to the first selected item.
>
>
>
>
> On Dec 4, 2013, at 3:31 PM, Ke Carlton <[hidden email]> wrote:
>
> > -logicaloperator = 'or' maybe?
> >
> >
> > On 4 December 2013 20:01, Lee Glickenhaus <[hidden email]> wrote:
> >
> >> I don't know why it's taken me so long to notice this but….
> >>
> >> I have a select multiple field in my search form with a hidden
> >> -operator=cn so the search will find all records that contain a selected
> >> item
> >>
> >> But… I noticed that when more than one item is selected, the FIRST item
> >> has a "contains" operator  and the SECOND has a "begins with"
> >>
> >> Here are the action_params I get:
> >>
> >> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
> >> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
> >>
> >> As a result, if I search for more than one item, I get a "no results"
> >>
> >> Lasso 8.6
> >>
> >> Any thoughts?
> >>
> >> Lee
> >>
> >>
> >>
> >> #############################################################
> >> This message is sent to you because you are subscribed to
> >>  the mailing list Lasso
> >> [hidden email]
> >> To unsubscribe, E-mail to: <[hidden email]>
> >> Send administrative queries to  <[hidden email]>
> >>
> >
> > #############################################################
> > This message is sent to you because you are subscribed to
> >  the mailing list Lasso
> > [hidden email]
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
> >
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

stevepiercy
In reply to this post by Lee Glickenhaus-2
Something is whacked in your code.  Try this, select 1 and 2, then submit.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>select multiple test</title>
</head>
<body>
<form action="[response_filepath]" method="post">
<select id="s" name="s" multiple="">
    <option label="1" value="1"></option>
    <option label="2" value="2"></option>
    <option label="3" value="3"></option>
</select>
<input name="submit" type="submit" value="Submit" />
</form>
<p>[action_params]</p>
</body>
</html>

=>
array:
(pair: (-nothing)=()),
(pair: (-operatorlogical)=(and)),
(pair: (-maxrecords)=(50)),
(pair: (-skiprecords)=(0)),
(pair: (-op)=(bw)),
(pair: (s)=(1)),
(pair: (-op)=(bw)),
(pair: (s)=(2)),
(pair: (-op)=(bw)),
(pair: (submit)=(Submit))

I get bw ops, no cn.

--steve


On 12/4/13 at 3:01 PM, [hidden email] (Lee Glickenhaus) pronounced:

> I don't know why it's taken me so long to notice this but….
>
> I have a select multiple field in my search form with a hidden -operator=cn so the
> search will find all records that contain a selected item
>
> But… I noticed that when more than one item is selected, the FIRST item has a
> "contains" operator  and the SECOND has a "begins with"
>
> Here are the action_params I get:
>
> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>
> As a result, if I search for more than one item, I get a "no results"
>
> Lasso 8.6
>
> Any thoughts?
>
> Lee
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Lee Glickenhaus-2
I WANT "cn" but I only get that for the first item -- after that, it reverts to the default "bw". That's the problem. All the values are stored in one field which can only BW one thing - so I need cn.



On Dec 4, 2013, at 6:17 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:

> Something is whacked in your code.  Try this, select 1 and 2, then submit.
>
> <!DOCTYPE html>
> <html>
> <head>
>    <meta charset="utf-8" />
>    <title>select multiple test</title>
> </head>
> <body>
> <form action="[response_filepath]" method="post">
> <select id="s" name="s" multiple="">
>    <option label="1" value="1"></option>
>    <option label="2" value="2"></option>
>    <option label="3" value="3"></option>
> </select>
> <input name="submit" type="submit" value="Submit" />
> </form>
> <p>[action_params]</p>
> </body>
> </html>
>
> =>
> array:
> (pair: (-nothing)=()),
> (pair: (-operatorlogical)=(and)),
> (pair: (-maxrecords)=(50)),
> (pair: (-skiprecords)=(0)),
> (pair: (-op)=(bw)),
> (pair: (s)=(1)),
> (pair: (-op)=(bw)),
> (pair: (s)=(2)),
> (pair: (-op)=(bw)),
> (pair: (submit)=(Submit))
>
> I get bw ops, no cn.
>
> --steve
>
>
> On 12/4/13 at 3:01 PM, [hidden email] (Lee Glickenhaus) pronounced:
>
>> I don't know why it's taken me so long to notice this but….
>>
>> I have a select multiple field in my search form with a hidden -operator=cn so the
>> search will find all records that contain a selected item
>>
>> But… I noticed that when more than one item is selected, the FIRST item has a
>> "contains" operator  and the SECOND has a "begins with"
>>
>> Here are the action_params I get:
>>
>> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
>> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>>
>> As a result, if I search for more than one item, I get a "no results"
>>
>> Lasso 8.6
>>
>> Any thoughts?
>>
>> Lee
>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Lee Glickenhaus-2
In reply to this post by Ke Carlton-3
-opbegin doesn't fix it.  Tried.

it really looks like a Lasso bug -- there seems to be no way to have the second + item selected searched with anything but a "bw" operator (but I'm hoping there's an answer somewhere)



On Dec 4, 2013, at 5:24 PM, Ke Carlton <[hidden email]> wrote:

> Perhaps go down the -sql route, or try -opbegin and -opends:
>
> inline(-database = 'x',-table = 'y', 'this' = 'that', -opbegin = 'or',
> 'keywords'
> = 'a', 'keywords' = 'b',-opend, -search);
>     // it's been a long time since I've touch classic inlines.
> /inline;
>
> Depending on the datasource you may need to filter after retieving the rows.
>
> Ke
>
>
> On 4 December 2013 21:46, Lee Glickenhaus (lists) <[hidden email]> wrote:
>
>> yes-- that works but when all the other fields are taken into
>> consideration, searches get very over-inclusive so I want to offer people a
>> choice between OR and AND.  Or works fine, but AND is broken because of
>> this strange situation.  I don't understand wht Lasso only applies to
>> "contains"operator to the first selected item.
>>
>>
>>
>>
>> On Dec 4, 2013, at 3:31 PM, Ke Carlton <[hidden email]> wrote:
>>
>>> -logicaloperator = 'or' maybe?
>>>
>>>
>>> On 4 December 2013 20:01, Lee Glickenhaus <[hidden email]> wrote:
>>>
>>>> I don't know why it's taken me so long to notice this but….
>>>>
>>>> I have a select multiple field in my search form with a hidden
>>>> -operator=cn so the search will find all records that contain a selected
>>>> item
>>>>
>>>> But… I noticed that when more than one item is selected, the FIRST item
>>>> has a "contains" operator  and the SECOND has a "begins with"
>>>>
>>>> Here are the action_params I get:
>>>>
>>>> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
>>>> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>>>>
>>>> As a result, if I search for more than one item, I get a "no results"
>>>>
>>>> Lasso 8.6
>>>>
>>>> Any thoughts?
>>>>
>>>> Lee
>>>>
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Tom Fortis
In reply to this post by Lee Glickenhaus-2
I just put -op='cn' in front of each query pair.

Tom

On Dec 4, 2013, at 3:57 PM, Lee Glickenhaus (lists) <[hidden email]> wrote:

> I WANT "cn" but I only get that for the first item -- after that, it reverts to the default "bw". That's the problem. All the values are stored in one field which can only BW one thing - so I need cn.
>
>
>
> On Dec 4, 2013, at 6:17 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:
>
>> Something is whacked in your code.  Try this, select 1 and 2, then submit.
>>
>> <!DOCTYPE html>
>> <html>
>> <head>
>>   <meta charset="utf-8" />
>>   <title>select multiple test</title>
>> </head>
>> <body>
>> <form action="[response_filepath]" method="post">
>> <select id="s" name="s" multiple="">
>>   <option label="1" value="1"></option>
>>   <option label="2" value="2"></option>
>>   <option label="3" value="3"></option>
>> </select>
>> <input name="submit" type="submit" value="Submit" />
>> </form>
>> <p>[action_params]</p>
>> </body>
>> </html>
>>
>> =>
>> array:
>> (pair: (-nothing)=()),
>> (pair: (-operatorlogical)=(and)),
>> (pair: (-maxrecords)=(50)),
>> (pair: (-skiprecords)=(0)),
>> (pair: (-op)=(bw)),
>> (pair: (s)=(1)),
>> (pair: (-op)=(bw)),
>> (pair: (s)=(2)),
>> (pair: (-op)=(bw)),
>> (pair: (submit)=(Submit))
>>
>> I get bw ops, no cn.
>>
>> --steve
>>
>>
>> On 12/4/13 at 3:01 PM, [hidden email] (Lee Glickenhaus) pronounced:
>>
>>> I don't know why it's taken me so long to notice this but….
>>>
>>> I have a select multiple field in my search form with a hidden -operator=cn so the
>>> search will find all records that contain a selected item
>>>
>>> But… I noticed that when more than one item is selected, the FIRST item has a
>>> "contains" operator  and the SECOND has a "begins with"
>>>
>>> Here are the action_params I get:
>>>
>>> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
>>> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>>>
>>> As a result, if I search for more than one item, I get a "no results"
>>>
>>> Lasso 8.6
>>>
>>> Any thoughts?
>>>
>>> Lee
>>>
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy               Web Site Builder               Soquel, CA
>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>



-------
Tom Fortis
IT Manager

BFTV Cluster
1206 RMI South
Biological & Agricultural Engineering
Food Science & Technology
Textiles & Clothing
Viticulture & Enology
University of California, Davis
(530) 752-9167  Fax (530) 752-0382



#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Lee Glickenhaus-2
yeah - I guess that's where I'll go but I have to parse the param to extract the individual elements.
not the end of the world, just one more PITA.  sigh.




On Dec 4, 2013, at 7:00 PM, Tom Fortis <[hidden email]> wrote:

> I just put -op='cn' in front of each query pair.
>
> Tom
>
> On Dec 4, 2013, at 3:57 PM, Lee Glickenhaus (lists) <[hidden email]> wrote:
>
>> I WANT "cn" but I only get that for the first item -- after that, it reverts to the default "bw". That's the problem. All the values are stored in one field which can only BW one thing - so I need cn.
>>
>>
>>
>> On Dec 4, 2013, at 6:17 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:
>>
>>> Something is whacked in your code.  Try this, select 1 and 2, then submit.
>>>
>>> <!DOCTYPE html>
>>> <html>
>>> <head>
>>>  <meta charset="utf-8" />
>>>  <title>select multiple test</title>
>>> </head>
>>> <body>
>>> <form action="[response_filepath]" method="post">
>>> <select id="s" name="s" multiple="">
>>>  <option label="1" value="1"></option>
>>>  <option label="2" value="2"></option>
>>>  <option label="3" value="3"></option>
>>> </select>
>>> <input name="submit" type="submit" value="Submit" />
>>> </form>
>>> <p>[action_params]</p>
>>> </body>
>>> </html>
>>>
>>> =>
>>> array:
>>> (pair: (-nothing)=()),
>>> (pair: (-operatorlogical)=(and)),
>>> (pair: (-maxrecords)=(50)),
>>> (pair: (-skiprecords)=(0)),
>>> (pair: (-op)=(bw)),
>>> (pair: (s)=(1)),
>>> (pair: (-op)=(bw)),
>>> (pair: (s)=(2)),
>>> (pair: (-op)=(bw)),
>>> (pair: (submit)=(Submit))
>>>
>>> I get bw ops, no cn.
>>>
>>> --steve
>>>
>>>
>>> On 12/4/13 at 3:01 PM, [hidden email] (Lee Glickenhaus) pronounced:
>>>
>>>> I don't know why it's taken me so long to notice this but….
>>>>
>>>> I have a select multiple field in my search form with a hidden -operator=cn so the
>>>> search will find all records that contain a selected item
>>>>
>>>> But… I noticed that when more than one item is selected, the FIRST item has a
>>>> "contains" operator  and the SECOND has a "begins with"
>>>>
>>>> Here are the action_params I get:
>>>>
>>>> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
>>>> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>>>>
>>>> As a result, if I search for more than one item, I get a "no results"
>>>>
>>>> Lasso 8.6
>>>>
>>>> Any thoughts?
>>>>
>>>> Lee
>>>>
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> Steve Piercy               Web Site Builder               Soquel, CA
>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
>
> -------
> Tom Fortis
> IT Manager
>
> BFTV Cluster
> 1206 RMI South
> Biological & Agricultural Engineering
> Food Science & Technology
> Textiles & Clothing
> Viticulture & Enology
> University of California, Davis
> (530) 752-9167  Fax (530) 752-0382
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Tom Fortis
Yes. As I recall 'bw' is the default operator when none is specified. And if specified only acts on the next search term... Not all subsequent. Oh well.
Tom

Sent from Tom's iPhone

> On Dec 4, 2013, at 5:04 PM, "Lee Glickenhaus" <[hidden email]> wrote:
>
> yeah - I guess that's where I'll go but I have to parse the param to extract the individual elements.
> not the end of the world, just one more PITA.  sigh.
>
>
>
>
>> On Dec 4, 2013, at 7:00 PM, Tom Fortis <[hidden email]> wrote:
>>
>> I just put -op='cn' in front of each query pair.
>>
>> Tom
>>
>>> On Dec 4, 2013, at 3:57 PM, Lee Glickenhaus (lists) <[hidden email]> wrote:
>>>
>>> I WANT "cn" but I only get that for the first item -- after that, it reverts to the default "bw". That's the problem. All the values are stored in one field which can only BW one thing - so I need cn.
>>>
>>>
>>>
>>>> On Dec 4, 2013, at 6:17 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:
>>>>
>>>> Something is whacked in your code.  Try this, select 1 and 2, then submit.
>>>>
>>>> <!DOCTYPE html>
>>>> <html>
>>>> <head>
>>>> <meta charset="utf-8" />
>>>> <title>select multiple test</title>
>>>> </head>
>>>> <body>
>>>> <form action="[response_filepath]" method="post">
>>>> <select id="s" name="s" multiple="">
>>>> <option label="1" value="1"></option>
>>>> <option label="2" value="2"></option>
>>>> <option label="3" value="3"></option>
>>>> </select>
>>>> <input name="submit" type="submit" value="Submit" />
>>>> </form>
>>>> <p>[action_params]</p>
>>>> </body>
>>>> </html>
>>>>
>>>> =>
>>>> array:
>>>> (pair: (-nothing)=()),
>>>> (pair: (-operatorlogical)=(and)),
>>>> (pair: (-maxrecords)=(50)),
>>>> (pair: (-skiprecords)=(0)),
>>>> (pair: (-op)=(bw)),
>>>> (pair: (s)=(1)),
>>>> (pair: (-op)=(bw)),
>>>> (pair: (s)=(2)),
>>>> (pair: (-op)=(bw)),
>>>> (pair: (submit)=(Submit))
>>>>
>>>> I get bw ops, no cn.
>>>>
>>>> --steve
>>>>
>>>>
>>>> On 12/4/13 at 3:01 PM, [hidden email] (Lee Glickenhaus) pronounced:
>>>>
>>>>> I don't know why it's taken me so long to notice this but….
>>>>>
>>>>> I have a select multiple field in my search form with a hidden -operator=cn so the
>>>>> search will find all records that contain a selected item
>>>>>
>>>>> But… I noticed that when more than one item is selected, the FIRST item has a
>>>>> "contains" operator  and the SECOND has a "begins with"
>>>>>
>>>>> Here are the action_params I get:
>>>>>
>>>>> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
>>>>> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>>>>>
>>>>> As a result, if I search for more than one item, I get a "no results"
>>>>>
>>>>> Lasso 8.6
>>>>>
>>>>> Any thoughts?
>>>>>
>>>>> Lee
>>>>>
>>>>>
>>>>>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso
>>>>> [hidden email]
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>>
>> -------
>> Tom Fortis
>> IT Manager
>>
>> BFTV Cluster
>> 1206 RMI South
>> Biological & Agricultural Engineering
>> Food Science & Technology
>> Textiles & Clothing
>> Viticulture & Enology
>> University of California, Davis
>> (530) 752-9167  Fax (530) 752-0382
>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

stevepiercy
In reply to this post by Lee Glickenhaus-2
Ah, OK.  Intent was not clear in original post.  Here's one
way.  You can grab my ZIP code database here:
http://www.stevepiercy.com/lasso_stuff/zipdist/distance.lasso

I do stuff like this all the time in Knop, using a method called
knop_form->updatefields.  It allows me to dynamically create the
params that I want to use in an inline.

--steve

--------------------------------------

<!DOCTYPE html>
<html>
<head>
     <meta charset="utf-8" />
     <title>Multiple Select</title>
</head>
<body>
<form action="[response_filepath]" method="post">
<select id="zip" name="zip" multiple="" size="10">
[loop(-from=900, -to=910)]
     <option label="[loop_count]" value="[loop_count]"></option>
[/loop]
</select>
<input name="submit" type="submit" value="Submit" />
</form>
<p>[
var('cnxn') = array(
     -database   = 'd',
     -table      = 'zip_codes',
     -username   = 'u',
     -password   = 'p',
     -maxrecords = 'all',
     -nothing);
local('zip' = action_params->find('zip'));
// manually build an array of params for your inline
local('params' = array);
#params->insert(-oplogical = 'or');
iterate(#zip, local('i'));
     #params->insert(-op = 'cn');
     #params->insert(#i->first = #i->second);
/iterate;
inline($cnxn, #params, -search);
     '<br>';
     action_statement;
     '<br>';
     records_array;
     '<br>';
/inline;
#params;
]</p>
</body>
</html>



On 12/4/13 at 6:57 PM, [hidden email] (Lee Glickenhaus (lists)) pronounced:

>I WANT "cn" but I only get that for the first item -- after
>that, it reverts to the default "bw". That's the problem. All
>the values are stored in one field which can only BW one thing
>- so I need cn.
>
>
>
>On Dec 4, 2013, at 6:17 PM, Steve Piercy - Web Site Builder
><[hidden email]> wrote:
>
>>Something is whacked in your code.  Try this, select 1 and 2, then submit.
>>
>><!DOCTYPE html>
>><html>
>><head>
>><meta charset="utf-8" />
>><title>select multiple test</title>
>></head>
>><body>
>><form action="[response_filepath]" method="post">
>><select id="s" name="s" multiple="">
>><option label="1" value="1"></option>
>><option label="2" value="2"></option>
>><option label="3" value="3"></option>
>></select>
>><input name="submit" type="submit" value="Submit" />
>></form>
>><p>[action_params]</p>
>></body>
>></html>
>>
>>=>
>>array:
>>(pair: (-nothing)=()),
>>(pair: (-operatorlogical)=(and)),
>>(pair: (-maxrecords)=(50)),
>>(pair: (-skiprecords)=(0)),
>>(pair: (-op)=(bw)),
>>(pair: (s)=(1)),
>>(pair: (-op)=(bw)),
>>(pair: (s)=(2)),
>>(pair: (-op)=(bw)),
>>(pair: (submit)=(Submit))
>>
>>I get bw ops, no cn.
>>
>>--steve
>>
>>
>>On 12/4/13 at 3:01 PM, [hidden email] (Lee Glickenhaus) pronounced:
>>
>>> I don't know why it's taken me so long to notice this but….
>>>   I have a select multiple field in my search form with a
>>>hidden -operator=cn so
>the
>>> search will find all records that contain a selected item
>>>   But… I noticed that when more than one item is selected,
>>>the FIRST item has a  "contains" operator  and the SECOND has
>>>a "begins with"
>>>   Here are the action_params I get:
>>>   (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),  (pair:
>>>(-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>>>   As a result, if I search for more than one item, I get a
>>>"no results"
>>>   Lasso 8.6
>>>   Any thoughts?
>>>   Lee
>>>     #############################################################
>>> This message is sent to you because you are subscribed to
>>>  the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: search operator and select multiple

Lasso Talk
In reply to this post by Lee Glickenhaus-2
I use this code and working correctly with MySQL:

-OperatorBegin='OR',
-Operator='cn','company'='stam',
-Operator='cn','company'='brück',
-Operator='cn','company'='mot',
-OperatorEnd='OR',

I use all Search parameters via local Array (dynamic) or static code
(example).

Lubos

> Lee Glickenhaus <mailto:[hidden email]>
> 4. decembra 2013 21:01
> I don't know why it's taken me so long to notice this but….
>
> I have a select multiple field in my search form with a hidden
> -operator=cn so the search will find all records that contain a
> selected item
>
> But… I noticed that when more than one item is selected, the FIRST
> item has a "contains" operator and the SECOND has a "begins with"
>
> Here are the action_params I get:
>
> (pair: (-op)=(cn)), (pair: (keywords)=(ADA)),
> (pair: (-op)=(bw)), (pair: (keywords)=(Administrative remedies))
>
> As a result, if I search for more than one item, I get a "no results"
>
> Lasso 8.6
>
> Any thoughts?
>
> Lee
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>