I am using the following scripts on a button to deal with tags (all from this forum or adapted for my use):
To replace click and tag:
Code: Select all
$tags = taglist();
if !($tags) { status "No tag(s) in taglist, aborted!", "8B4513", "stop"; end true; }
$tags = regexreplace($tags, "(.+?)(,|$)", "$1|$1|:tagsadd,");
$sel = inputselect("Choose tag(s) to apply", $tags, ",", 1+2+32+64+1024, , 300, 600);
tagitems("tags", $sel);
Code: Select all
$taglist = formatlist(taglist(), "t", ",");
$tags = inputselect("Find by Tags<crlf>Tick the tags that shall be matched.", $taglist , ",", 2);
// make it an OR-ed list
$tags = replace($tags, ",", "|");
goto "*?tags:""$tags"" /rv"
Code: Select all
$taglist = formatlist(taglist(), "t", ",");
$tags = inputselect("Find by Tags<crlf>Tick the tags that shall be matched.", $taglist , ",", 2);
// make it an OR-ed list
$tags = replace($tags, ",", "|");
goto "<curpath>?tags:""$tags"" /rv"
Code: Select all
$taglist = formatlist(taglist(), "t", ",");
$tags = inputselect("Find by Tags<crlf>Tick the tags that shall be matched.", $taglist , ",", 2);
// make it an OR-ed list
$tags = replace($tags, ",", ", ");
goto "<curpath>?tags:""$tags"" /rv"
Code: Select all
$taglist = formatlist(taglist(), "t", ",");
$tags = inputselect("Find by Tags<crlf>Tick the tags that shall be matched.", $taglist , ",", 2);
// make it an OR-ed list
$tags = replace($tags, ",", ", ");
goto "*?tags:""$tags"" /rv"
a) To do the same for labels (obviously only the OR option here) -- but I can't work out how to bring up labels in a list
b) To do AND/OR option for a combination of labels and tags -- in other words can I bring up some sort of a list that will contain all labels and tags. I could do this in the catalog. i.e. I want to be able to search for items that are labelled "Urgent" and have tag "dog"... Any help would be appreciated.
Should this stuff not be inbuilt?