Kinook Software Forum

Go Back   Kinook Software Forum > Ultra Recall > [UR] Suggestions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-12-2024, 09:14 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
I'm not sure that I am completely following that, but could you use the quick search filter field within an Advanced Search to do that?

Can you provide an example .urd file with further explanation or demonstration of what you are requesting? Thanks.
Reply With Quote
  #2  
Old 02-14-2024, 03:04 AM
Spliff Spliff is offline
Registered User
 
Join Date: 04-07-2021
Posts: 207
Thank you very much for your question: In fact, I had left out the problems arising with the combination of the "Search for" field, and then the "list conditions".

Unfortunately, the string condition within the field has to be fulfilled by each result sine qua non, AND then the "list conditions" (lc) have to be fulfilled, as a block, either, i.e. the implicit code is:
(yourstring) AND (whatever your other conditions here),
in other words, there is a big AND between the "Search for" field, and the "list", and that's why, e.g., at the start of the very first "list" line (and different from any other list line), there is NO "and/or" toggle, since the whole list is considered "and".

I admit that for some compound searches, this (very limiting) construct is fine, but for others it's not, e.g. whenever you want, as I do, in my "simili hierarchy within a flat list" Advanced Search, have any (or, as here, even several) "list" conditions alternatively to your (main) string condition, not "above on" it, so, if I want to also display the "construction" items (i.e. the inter-titling, as in my example above), I have to type the search term as just another list element, the "Search for" field being useless = left blank.

In this context, it's also of interest to remind that a simple toggle "and/or" between the field and the list would not resolve the problem, since then again, the whole list would be considered as ONE (not additional anymore, but alternative) condition, and thus would now display too many results, instead of too few. (Since in my example, the "indent level" condition is additional to anything else, whilst the other list conditions are alternative to the string condition.)

That's why I had suggested an additional field "Individual", to contain, in case, the individual string (or perhaps number, in case, for address, or year fields, or similar: individual data vs. "schematic" data, within the other "list" fields) for any (but just one) list field which (by the drop-down list, so that would be easy to add to the drop-down) allows for either string or numeric input: Then, in order to have an input field, the last column in the "list" would mention "IND." or somewhat (selected, as said, by the respective drop-down entry), and IF there is just ONE such list field (for which the user has selected the "Individual" field content), the input of the "Individual" field above, between the "Search for" field and the "Start" button (or even just above the "Search titles only", etc. block of check boxes), UR would replace the "IND." marker by the content of the "Individual" field above;

- user chose "ind." for more than one list field > Error message asking for "just 1 such list field"
- user chose "ind." for one list field, but without content in the "Individual" field > (either error message, or, and preferably,) value / condition is excluded from the sql search string
- there is (previous) input in the "Individual" field, but no condition with "Ind." > "Individual" string is simply not included into the search, since there is no condition which would include it


This arises the question if the "Search for" field could probably be used instead, with adding the usual "and/or" toggle also to the very first "list" row; default being "and" (as usual, too), and the "and/or" would only apply to that very first "list" condition; you would remove the global parentheses around the "list block".

The problem with this alternative would be twofold: Error-prone on the user-side (as is the current "package" indentation within the list, instead of parentheses, indentation regularly indicating subordination, which is not the case here where it's just grouping); and then, the "Search for" field currently only allows for "search string everywhere within the items", neither "title only" nor numeric fields, in other words and e.g., it doesn't allow for "title:Search term to be searched just in titles", which would be a frequent (!) search, especially if users do tagging in titles, and it's obvious that almost every such "tag search" would be for different tags or different tag values, so this would be quite inferior.

In contrast, my problem solution above - needing an additional field - would both be much neater (i.e. less ambiguous) for the user, and would also allow for fast (!), individual, compound searches of specific title data, and of data within numeric, or then specific string fields, i.e. its application scope would be much broader.

(And at the end of the day, the introduction of an additional field would probably even become the very first step for some day allowing sql "select" strings, allowing for quick individualization of more than just one condition? ;-) (User-side AHK input box, then a macro writing the necessary select strings. Would happily share.)
Reply With Quote
  #3  
Old 02-14-2024, 06:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
I'm still not grokking it. Can you provide an example with visual mockup? Thanks.
Reply With Quote
  #4  
Old 02-14-2024, 11:46 AM
Spliff Spliff is offline
Registered User
 
Join Date: 04-07-2021
Posts: 207
A) First, you have the input field "Search for:": This is just for general = item-wide string search, can not be used for "search title", for "search item notes", or any other specific field search.


B) Then, you have buttons Start, Reset, Copy, Quick<,


B2) and to its right, there is room for a second input field, albeit not as large as the "Search for:" field.


C) The "list", with and/or (except for the very first row/element), Item/Attribute, Not-toggle, Comparison, and Value fields.
In here, the "Comparison" field is filled by a drop-down menu which just offer those elements / menu entries which make sense for the respective "Item/Attribute" selection, e.g. "Comparison: contains keywords" is present for "Item/Attribute: Item", and others, but not also for "Item/Attribute: Access Count" (since "contains keywords" would not make sens for that); on the other hand, "Comparison: less than" is available for "Item/Attribute: Access Count", but not for "Item/Attribute: Item" - and so on; when "Item/Attribute: Has Children" though, the "Comparison" drop-down just offers "exists" and "equals", and the "Value" column in the list doesn't allow user (string or number) input, but again provides a drop-down, for "yes/no" here.

Thus, it becomes evident that for adding an additional entry "Individual" (or similarly worded) to many (but not all of the) "Comparison" drop-down menus, would be easy, since that additional entry would apply to any "Comparison" drop-down even today, an entry inviting to enter either a string ("contains keywords") or a number ("greater than", etc) is present.

The drop-down "Individual" choice by the user would then automatically fill the "Value" field of that "list" row with a fixed "Individual", not allowing for user input, and if the user wanted to change that, and enter a manual value here, they would have to select another "Comparison" drop-down entry, making available the "Value" field available for manual input again.


Upon "Start" (by enter, or pressing the button), the code would check if there are more than just one "Individual" entries in the list B), and if there are, instead of triggering the search, it would ask the user to change those "Individual" rows to fixed ones (i.e. with a real value within the row's "Value" field, instead of invariant "Individual");

if there is only just one such row though, the code would retrieve the content of field B2) IF there is one, and quickly check if the format applies: just a number if the "Individual" row asks for number input, and any string if that row asks for string input; if there is a string for a number input row, the code would give an error message, along the lines of, "'Individual' input can't be a string here; enter a number, or change 'Item/Attribute' or 'Comparison'";

if there is (residual) input in B2), but no "Individual" row, the sql select is constructed without the B2) string;

if there is an "Individual" row, but no data in B2), then, similarly, the sql select is constructed without the "Individual" row condition.


- My example above shows it very clearly: Really "individual" searches have currently to be made by constructing the search within C), not by combining A) (since A doesn't allow but for too general search scope: the whole item, and for too few logic combinations: no grouping / parentheses allowed in A) with C), and that means often, the user must enter even the main search string of such compound searches within C (where it's cumbersome), instead of entering them in A).

- It might be of some interest, as an alternative to the above, to add the and/or even to C's first row, and then (instead of treating A) and C) as "A AND C" (block-wise)), to imply a "group" just between A) and the very first rows in C) while they are NOT indented, so

A) this
C)
and that
or other
___or these
___and those

would not be translated anymore to

(this) AND ((that or other) OR (these and those))

but to (OR having precedence over AND)

(this and (that or other)) OR (these and those)

In other words, on the logical level, A) would become a part of C), like any row 1, 2, 3... in C) while these rows are not indented.

As said above though, this alternative (avoiding B2) would not resolve the problem of A)'s too global scope, making e.g. individual title:search-string search impossible: the values for string-in-title search would again have to be entered in C), contrary to the first alternative, with B2):

In C), the user would select, for title-search, "Individual", and would then enter the individual value for each new title-search into B2); ditto for any other string or numeric attribute.

That way, the user could create several schema "advanced searches", for different search situations, BUT then enter the individual search string within B2).

Or then, they could enter it in A) IF A)'s functionality was greatly enhanced, allowing for input like
title:search-string notes:search-string,
the code then resolving such keyword:string combinations into the respective column search elements: Such compound searches within the same input field would be a first step to allowing parentheses in there, and would indeed, at some time, make C), the "list", redundant insofar as the "power user" was concerned.

Obviously, B2) is, code-wise and for the user, the simplest solution to the problem; the current "A AND C" (even with an added toggle for "A OR C") though, logically separates the "main search term" from the rest of the conditions, whilst - as shown above - more elaborate compound searches ask for more intimate integration of that "main search term" into other conditions:

My suggested solution, B2) (which, as A does, should also allow for AND and for OR), its value being retrieved by an "Individual" "value" marker in any C) row (as long as it is the only one of its kind), provides that: easy enter and change of the main search term(s), AND permitting that this "string condition" can be placed anywhere in the "select" code.
Attached Images
 
Reply With Quote
  #5  
Old 02-17-2024, 02:00 PM
Spliff Spliff is offline
Registered User
 
Join Date: 04-07-2021
Posts: 207
It seems to me that the core problem with your Advanced Search construction currently lies in the fact that the whole "list" is treated as a block condition, and with the implicit "and" thus as a SUB-condition for the "Search for" string above the block; this fact makes that for many compound searches, the "string search" will have to be placed within the "list", while the "Search for" string remains empty, and then, adjusting the string to your current search needs - all other "list" rows remaining unchanged for that specific "Advanced Search schema" - is far from easy, i.e. time consuming.

Thus my suggestion above to logically treat the Search-for field as just another, UN-indented "row" of the "list", adding the and/or switch also to the first "list" row (string-field condition always "global" then, not for title-only and similar, which, as said, makes this solution non-optimal, but so much better than the current construction all the same):

string-field condition
and/or other non-indented condition(s)
__and/or indented condition(s)
____and/or (another block of) indented condition(s), and so on.

Obviously, it is possible to programmatically change string values even within the "list", here the value in the very first "list" row:

special-key:: ; to be pressed when the title of the advanced-search schema is selected
send {tab 5}
sleep, 200
send ^{home} ; to assure focus gets back to first row in case
; send {down} ; for second row, or {down 2} for third row, etc.
sleep, 100
send {end} ; set focus to row's value field
sleep, 100
send {f2} ; EDIT: you want to UPDATE this value, so leaving the F2 out would not have been the very best idea here ;-)
return

Trigger the special key (which in other apps can be used otherwise), then enter the string, then 2 "returns" will trigger the search; of course, that first row could be a title:string condition or similar.

It's ugly, but works: the user should adjust the width of the "list's" value column, obviously, making it as large as possible; fortunately, that width adjustment is persistent (if the user takes care of adjusting it when just 1 UR db is loaded).

In the end, certainly most searches could be done this way: Not using the "Search for" field, but using the very first "list" row for the main (global or specific) string condition instead, and then, of course, putting MUCH care into the "condition blocks", separated by different "list" indentations (parentheses would have been easier indeed).

Last edited by Spliff; 02-18-2024 at 01:01 AM.
Reply With Quote
  #6  
Old 02-25-2024, 02:34 AM
Spliff Spliff is offline
Registered User
 
Join Date: 04-07-2021
Posts: 207
After some practical use, I've not been happy with my solution(s) above.


1) Core items (which regularly would be in level 2) > together with the (inter-) titling, in level 1.

The visual aspect (see above) is top-notch indeed (for special use cases that is), and the tree-preserving search results (which exclude further-down level "finds") are satisfying, too; the fact that ALL inter-titling here is just ONE level (whilst ordinarily, they would be spread over 2, 3 levels) also is acceptable in those special use cases.

The problem lies in the navigation, though: Since core items and their "conceptional parents" are at the same level, the icl (item command line) of the former does NOT contain the latter, and that makes navigation cumbersome (but not impossible):

My system relies on markers, so the titles bear not only "bold" flags but also (here) a leading dot, and then, the titles are named in a way that their very first "normal" char (i.e. the one after the dot) is unique in this construction; thus, for navigation (or for moving items), it's possible indeed to go to the root item ({home}), then to send ".f", to go the .f title, then to send "e" to go to the item Esomething below title ".f"; since it's a macro, you would not press 4 keys (home, dot, f, e) but "just" 3: specialkey, f, e - obviously, this macro doesn't really help if again and again, you want to STAY within your current "sub-tree", i.e. within the range of your "current siblings", i.e. those which have the same "parent", ".f" in this example.

If you just press "e" instead, you will probably go to some "e" which, in the tree, is below your current position, below some title "h" in-between; thus, you would want to go to the "parent" item first (i.e. the title "above" your target item: ".f"), then you would want to go to its "child item" "esomething".

In this situation, in a regular construction (fsome or .fsome = level 1, esome = level 2), this would be easy, even without a macro, since you would simply enter {left} = go to parent, e = go to esome = just 2 keys, AND you would not need to first think of "what name is the parent?", whilst in the "everything in level 1" construction, you would have to check or remember the "f" for the "parent", in order to first go to it - and then you will have to work this way all day long in your "everything in the same level" construct.

Thus, this is visually pleasing, and gives the wanted search results, but it's not realistic in real life.

Thus, I have adopted a "more regular" construction, which visually is awful, but which is the only construct you can currently really use if you need tree preservation of the search results:

Root (level 0)
.T (level 1, abbreviated so that it's less awful)
__.Title ".T..." in full string (all these in level 2) (edited)
__Core item
__Another core item
____(on level 3 and deeper down, other items in case, obviously)
__and so on
.A (level 1, abbreviated again)
__.Another title, ".A...", in full string (level 2 again) (edited)
__And your core items here (level 2...)
__etc

In other words, I duplicate the first char of the titles into a higher-up level (level 1), then search for results just in level 2, and get the same search results as before, BUT can now do
- {left} e (2 keys) for getting to item "esome" "within" my current "f" siblings range, and, of course, when I want to go to some item elsewhere, I can do
- specialkey h k (3 keys to go root, then go to .h (for hsome, and make that the first visible item then), then to ksome.

Please note that without the leading .title dots, such a navigation would not be possible but if you systematically collapse anything (UR has a setting for doing this even automatically if your really want to do this), which will seriously hamper your "overall view" though.

(As for the search, see below.)

(EDITED above:
"__.Title ".T..." in full string (all these in level 2) (edited)"
I first had left out the leading dots here, trying to hold it as simple as possible, but that was misleading, since in fact, I replicate the dot:
Since CharSearch navigation is "top-down", the ".A" will be navigated to (level 1), not the .Afulltitlestring (level 2) (ditto for {left} for "go to parent item"), but after that, any "a" will navigate to the very first ASomeItem (item starting with "a"), so it would be misplaced to "sacrifice" the "a" for AFullTitle when replicating the leading dot (necessary for the abbreviated title only), making it .AFullTitle instead, does not do any harm but preserves the possible use of a leading "a" (in this example) for any core item in that "A" title's child items range. Thus, technically, "AFulltitle" (level 2) would be sufficient, but wouldn't be advisable.)


2) The Search Rows

I have explained above why the current AS (advanced search) construction, with "string by input field" plus "AND BLOCK" condition to that string condition is unusable for many real life search tasks, so I suggested, for those situations, to use the very first AS ROW for the string condition, but that would make control-home for first row, then {end} to activate that row's value column:

It's easier to use the very last row instead, since a control-end will automatically activate its value field (in one step, instead of two); also, in my example for the task above (1), compare the two (functionally identically) constructions below: obviously, the second one (in this case at least) is more comprehensive.


3) Currently no "Discard row condition from search"

Whilst the conditions AND and OR are available by drop-down, the NOT condition is available by check-box; what's missing though: a checkbox for quick-n-dirty discarding (!) a row's condition (which obviously is not NOT but "is irrelevant currently"); technically, such a row would not be retrieved while the code behind the AS interface builds the AS's select-string - so technically, the implementation would be easy.

Obviously, this would help for standard ASs with "variants", so that the user would not have to multiply stored ASs but could choose the applicable variant "on-the-spot".


And here now the two screenshots both illustrating 1) and 2), the second one, as explained in 2), obviously being preferable in the situation explained in 1) and possibly even beyond:
Attached Images
   

Last edited by Spliff; 02-25-2024 at 03:16 AM.
Reply With Quote
  #7  
Old 02-26-2024, 06:41 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
In the latest download (6.3.0.12), an Exclude column has been added to the advanced search grid. Drag to expand beyond the last column header to show it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:55 PM.


Copyright © 1999-2023 Kinook Software, Inc.