I'm facing with trival problem that concern searching records with exact string, selected from value list.
My BO with attributes:
Document
Type
DocumentType (value list)
Name
Relation 1 to 1 with Document.Type -> Type
Values are:
K
KK-P
What I want to do, is give users ability to find only document with type K.
Now, when I select K from value list, result shows K and KK-P documents like with CONTAINS operator.
It's also important to set this search criteria on one, full form with all attributes.
So, user can:
- open search form,
- fill attributes that he wants
- select value from drop down Type
and system will find only docs with exact value in filed Type.
It's works fine when I type ='K' in Type filed but it's too complicated for regular user and regular use.
This could be serious problem in feature BS.
Do you already have a workaround for this, dear AwareIM community?
[/b]
FIND exact string from value list ='value'
-
- Posts: 92
- Joined: Thu Jan 10, 2013 10:50 pm
-
- Posts: 7535
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
A number of ways to do this as always the case in AwareIM. One way is to make you document type a drop down reference list. Then on the search form users can select the document type that they want from the list which will only find those equal to the value the user selected. If you want to retain the contains type search then just have two attributes on your BO. Set up a rule to copy the reference list description to your current attribute. Your search form can then be set up something like:
Document type contains:
Document type equals :
IN other words it contains two search attributes one which is a field to be entered as is the case now, the other which has a drop down list to select a specific document type.
Cheers Rod
Document type contains:
Document type equals :
IN other words it contains two search attributes one which is a field to be entered as is the case now, the other which has a drop down list to select a specific document type.
Cheers Rod
-
- Posts: 92
- Joined: Thu Jan 10, 2013 10:50 pm
Thanks for response.
You mean, Filter displayed items option to filter values in drop down?
If yes, then this is not what I need.
I just want to find all Documents with Type = 'K' without 'KK-P'
When I select K in drop down on search form it works like with CONTAINS operator and returns documents with K and KK-P Type.
![Image](http://www.freeimagehosting.net/newuploads/cgirf.png)
You mean, Filter displayed items option to filter values in drop down?
If yes, then this is not what I need.
I just want to find all Documents with Type = 'K' without 'KK-P'
When I select K in drop down on search form it works like with CONTAINS operator and returns documents with K and KK-P Type.
![Image](http://www.freeimagehosting.net/newuploads/cgirf.png)
-
- Posts: 92
- Joined: Thu Jan 10, 2013 10:50 pm
Thanks RocketRod!
Regarding to the second method, I must admit that I don't understand what you mean
can you explain more, please ?
I'm not sure but I think that this is how it is done now. Document Type is a drop down reference list. The lists of values is "collected" from DocumentType attribute and it doesn't seems to work as you mention.One way is to make you document type a drop down reference list. Then on the search form users can select the document type that they want from the list which will only find those equal to the value the user selected.
Regarding to the second method, I must admit that I don't understand what you mean
![Sad :(](./images/smilies/icon_sad.gif)
can you explain more, please ?
-
- Posts: 92
- Joined: Thu Jan 10, 2013 10:50 pm
-
- Posts: 92
- Joined: Thu Jan 10, 2013 10:50 pm
Further clarification.
1. As far as I am aware there is no way to stop users typing into a search reference drop down list field. So if they type in K it will bring back K, KK-A etc, you are correct. If however you can train them to always select from the drop down list itself then if you can also make the document types unique by adding a . for example at the end of the code, so K. KK-A. you should be ok. The user selects K. and it should only find K. not the others.
2. If you can't stop them typing in a K in the search field then set up a process with a PICK then DISPLAY QUERY in it so you have total control over how it works.
Cheers Rod
1. As far as I am aware there is no way to stop users typing into a search reference drop down list field. So if they type in K it will bring back K, KK-A etc, you are correct. If however you can train them to always select from the drop down list itself then if you can also make the document types unique by adding a . for example at the end of the code, so K. KK-A. you should be ok. The user selects K. and it should only find K. not the others.
2. If you can't stop them typing in a K in the search field then set up a process with a PICK then DISPLAY QUERY in it so you have total control over how it works.
Cheers Rod
-
- Posts: 92
- Joined: Thu Jan 10, 2013 10:50 pm
-
- Posts: 92
- Joined: Thu Jan 10, 2013 10:50 pm
This is the solution that we consider as the only sensible.
This is often used feature and it will be unhandy for users but what else to do...
If only rules work on search form... we could create calculation for this field to get ='K' when user select K.
Maybe this is something that is worth to be added to TODO list, support?
This is often used feature and it will be unhandy for users but what else to do...
If only rules work on search form... we could create calculation for this field to get ='K' when user select K.
Maybe this is something that is worth to be added to TODO list, support?
You can control the search by using the ?ask at runtime feature when defining the search
FIND BO Where BO.Attribute1=? AND BO.Attribute2 =?'custom label'
OR
create a non persisting BO with the same attributes that you need for the search - and a form. Then in a process do
ENTER NEW NPBO USING your form
FIND BO WHERE BO.attribute1 = NPBO.attribute1 etc etc
FIND BO Where BO.Attribute1=? AND BO.Attribute2 =?'custom label'
OR
create a non persisting BO with the same attributes that you need for the search - and a form. Then in a process do
ENTER NEW NPBO USING your form
FIND BO WHERE BO.attribute1 = NPBO.attribute1 etc etc
Rocketman
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
You can also build your own query filter form and use the results in the query. Below is the FIND statement for a query which uses 3 drop down references and 2 dates which are stored in the SystemUser BO:
FIND Movement WHERE (Movement.Movement.Description=LoggedInSystemUser.Selected_Movement.Description OR LoggedInSystemUser.Selected_Movement IS UNDEFINED) AND Movement.WhenCompleted>=LoggedInSystemUser.Selected_Date_From AND Movement.WhenCompleted<=LoggedInSystemUser.Selected_Date_To AND (Movement.Movement.Group_List CONTAINS LoggedInSystemUser.Selected_Movement_Group.Grouping OR LoggedInSystemUser.Selected_Movement_Group IS UNDEFINED) AND (Movement.Timing.Timing=LoggedInSystemUser.Selected_Movement_Timing.Timing OR LoggedInSystemUser.Selected_Movement_Timing IS UNDEFINED) ORDER BY Movement.WhenCompleted,Movement.TimingNbrSC,Movement.ID
FIND Movement WHERE (Movement.Movement.Description=LoggedInSystemUser.Selected_Movement.Description OR LoggedInSystemUser.Selected_Movement IS UNDEFINED) AND Movement.WhenCompleted>=LoggedInSystemUser.Selected_Date_From AND Movement.WhenCompleted<=LoggedInSystemUser.Selected_Date_To AND (Movement.Movement.Group_List CONTAINS LoggedInSystemUser.Selected_Movement_Group.Grouping OR LoggedInSystemUser.Selected_Movement_Group IS UNDEFINED) AND (Movement.Timing.Timing=LoggedInSystemUser.Selected_Movement_Timing.Timing OR LoggedInSystemUser.Selected_Movement_Timing IS UNDEFINED) ORDER BY Movement.WhenCompleted,Movement.TimingNbrSC,Movement.ID
Tom - V8.8 build 3137 - MySql / PostGres
You might want to check out the sample BSV at:
http://www.awareim.com/forum/viewtopic.php?t=6633
http://www.awareim.com/forum/viewtopic.php?t=6633
Tom - V8.8 build 3137 - MySql / PostGres