INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Nested events - how to display, batch delete, batch assign, etc.  (Read 3806 times)

raldo

  • Citizen of the Universe
  • *****
  • Posts: 1102

While awaiting some changes to MCs photo tagging capabilities, I'm investigating nested fields. More specifically, events within the keyword tag.

some questions:

(1) Compatability with other applications:

Which applications recognise nested keywords?

And, are nested keywords a part of any "standard"? Can we assume that nested keywords will be supported in the future by other "important" applications?

(2) Batch extraction of events from keyword tags

Is it possible to extract/move event keywords only from keywords tagged as follows event\[description] to a new tag? Even when images are tagged with other keywords ?

(3) IPTC Extension "Event" tag - Is it used by anyone?

(4) How do I make a view which only displays events without the "event" keyword on top of the tree?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #1 on: May 29, 2014, 08:55:11 am »

I can't address all your questions, esp. those regarding other apps.  I don't tag photos in MC, so am not familiar with its cross-app compatibility.

Keywords is just a long string value.  MC treats long string values with semicolons a individual items in certain cases; nonetheless, it is still just  along string.

You can use my pscriptor tool to process any field(s) you want.  If you need a particular capabilities, just ask on the thread and lets see what we can do.

Regarding (4), you can use Replace() to strip out the leading "event\" portion of a string.
Logged
The opinions I express represent my own folly.

cncb

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3105
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #2 on: May 29, 2014, 09:26:54 am »

Windows, Windows Live Photo Gallery, and Windows Media Center can exchange nested keywords with MC.  Adobe Photoshop Elements is not compatible (reads them as flat keywords).  I think Lightroom can read them as nested keywords but stores/writes them in a different way.
Logged
-Craig    MO 4Media remote and player:  Android/TV/Auto | iOS | Windows 10/UWP

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #3 on: May 29, 2014, 12:40:21 pm »

Here, I tag everything photo using just the keywords field. For the nested parts, I always start the root name with an exclamation mark, which keeps all the 'folders' at the top of the list.

I have then created library fields called [Occasion], [Population], [Score] and [Location] and use expressions to draw the required information from the keywords field. These have some use in Standard view, but are most useful for theater view.

I am still only maintaining one field, Keywords, and all the others are automagic. Tagging new photos is a breeze using the tagging mode tick boxes in a single keywords field placed down the left hand side.

As for other applications, I only use Lightroom, MC and Flickr... From memory, Lightroom reads them, but writes them in a strange way. As I export from Lightroom to display in Media Center, I have had to set Lightroom to not read/write as heirarchy, and this way, MC can then read the exported tags, and gets the nesting correct. This is not as troublesome as it sounds as Lightroom's recent and suggested keyword panels are really, really good.
Flickr treats them all as literal strings. I accept this and go in and clean up the tags on Flickr every so often.

I understand that MC's nesting system works very well with Windows Explorer, with tags being written and read both ways by both applications.

#2 and #4:
The best way to get these done is to set up your own events field. Call it Occasion, it will be a calculated field, using the expression below, provided by MrC some time ago, adjusted for your "event\[description]"....
Code: [Select]
if(regex([keywords],/#(event[^;]+)#/,0),replace([R1],events\,),)&datatype=[list]
Now you can build a view based on [Occasion]. The only caveat with the expression above is that it can only extract the first event it encounters. It should work well for you as it's unlikely a photo will get tagged with multiple events, but thought it worth mentioning. For my [Population] field, I have had to resort to a more convoluted and crude expression, but the end result is all the people tags are extracted from keywords correctly and automagically, and I have a 'Population' field I can use to build people specific views around, with a flat list of people to pick from.

I've used this keywords only approach for our photos for many years now, and it just works. I am much happier working with one field as opposed to many when tagging photos.

-marko

raldo

  • Citizen of the Universe
  • *****
  • Posts: 1102
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #4 on: June 03, 2014, 01:30:13 pm »


Thanks, Marko, some good tips here.

Code: [Select]
if(regex([keywords],/#(event[^;]+)#/,0),replace([R1],events\,),)&datatype=[list]
The above expression works with "event" instead of "events".

Logged

connersw

  • Citizen of the Universe
  • *****
  • Posts: 661
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #5 on: June 03, 2014, 02:22:41 pm »

Very good tip indeed.  Thank you.  I'm bookmarking this since I may end up changing the way I tag my photos now.  Something on photo tagging like this, and other tricks, would make a great Tip of the Week.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #6 on: June 04, 2014, 01:05:02 am »

It works well for me, I like it, a lot. Like raldo, many moons ago, I also tried a myriad of image management programs, all of which promised to make my life hassle free.... It's all lies!

Image tagging is painful. Period.

We don't realise we should be doing it until we have thousands upon thousands of untagged photos, and tagging photos is about as far removed from tagging audio as you can get.
I also used Elements, for many years, back in the days before MC had stacking and was unable to display an image (in the GUI) bigger than a large thumbnail. Then v12 happened and all that changed. We got tag mapping, and all kinds of other image related goodness. That was 2006.

The problem with Elements, for me, was that when it came to mangement, MC blew it out of the water, and I got so tired of the hassle of trying to maintain two libraries containing the same files. I committed to MC as soon as we got stacks and haven't looked back since. Stacks are essential for images.

I have an old version of AcdSee here that I keep solely for the purpose of time shifting the EXIF date/time original tag on those shoots where the camera clock didn't get adjusted for DST, or I'm out with my granddaughter taking pics, and the times on our cameras are out of sync, or I scan printed photos and want an EXIF date/time to be created.... When MC gets that tool, I'll be exclusively MC for jpg photos. I use Lightroom for my NEF files, processing and tagging, exporting the jpgs to a folder MC watches.

Back in the day, I quickly realised that not many photos can be batch tagged. Sure, you can select all the ones you shot in a particular place, and tag them so, but some will have people, some won't, and so on.... I would cue up some music, and set about tagging. I did them in months. Some here, some there, and over time, they were all done. Two tips for happy tagging...
1. Don't do too many at once, it becomes a chore. Chores are not fun
2. If you can, tag faster than you import new stuff, and also tag the new stuff as you add it. The two will meet in the middle eventually.

Once you're caught up, tagging the new stuff is easy. I'll expand on my previous post as it's way too brief and a little interest has been shown, so I'll set it up offline and post back shortly...

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Nested events - Image Library Tips
« Reply #7 on: June 04, 2014, 01:05:17 am »

Media Center and Images (Primarily photos)
Experience with creating / setting up views and custom library fields is assumed.

Over the years, I have added quite a few things to MC to make it work for me and my photo library. Some of what follows may seem like too much hassle to set up, but think of it this way... Once set, you really can forget about it. When writing this up, I had to retrace several things to remind myself why this or that works, and has been working for so long, I also had to check a few things I couldn't remember were defaults or not. The bits and pieces were added over some time, as I found I needed them, and you are going to get them all at once. Depending how you're wired, your mileage may vary here. Let's begin... (all images can be clicked for a larger view)

Setting Up the view
MC arrives with some stock image fields. Things like People, Places, Events and of course, Keywords. My own personal experience was that trying to tag like this, via the tag window, or via pane tagging was cumbersome and error prone. Something was always getting missed, and once the fields filled up, scrolling in the little panes to find the desired tag got quite old quite quickly, so I decided I would ditch them completely and move everything into the keyords field.

Here is my working "Incoming Images" view.


I also have images other than photos in my MC library, things such as clipart, wallpaper, screenshots, album art and so on. Each of these subsets have their own keywords, but, if they're not in the file list, their keywords won't be shown either, so, when setting up the view, use the "Set rules for file display" option to exclude any other image types, and only list photos. Personally, I use another custom field called Type. All the others are assigned a type, photos are not, so, for me, "[media type]=image [type]=[]" will only return photos. You get the idea?

Only add the 'Keywords' field. I find it works best for me down the left hand side. I was never comfortable with Elements' 'Down the right hand side' approach.

We can group by any library field, so I created one, solely for this purpose.


Code: [Select]
if(isequal([filename],incoming,8),Not Tagged - formatdate([date,0],yyyy//MM//dd),Finished)
When applying the grouping, be sure to choose the "z-a" option, otherwise, all the stuff you want to work with will be at the bottom of the list.

tadaaa!

All new photos are saved to "D:\Pictures\Incoming". You do not need to copy this, all that's important is that all the new stuff starts off in the same folder, or subfolders of that folder, and have MC watch it with auto import. Adjust the code for the grouping field above to single out your chosen location.

Everything above "Tagged" resides in "D:\Pictures\Incoming\". After tagging, I run the 'Rename Move and Copy Files' tool over the tagged images, moving them out of the Incoming folder, and having done that, a refresh drops those photos into the "Finished" group.

Why is this set up this way?

If the view only listed files in the Incoming folder, then the keywords field would be empty (assuming the files are completely keywordless) or only contain keywords currently applied to those files, meaning that to tag with a keyword you know already exists, you need to hit "New keyword" to add a keyword that's well, not new. I want all photo keywords in that list, which means I need all files in the view, not just the new ones. The grouping option outlined above keeps all the new stuff at the top of the list, grouped by date, and lumps everything else together at the bottom. The tagged files are only there to populate the keywords field. When you are done, there will only be one group, and it will be called Finished, until more photos are added to your incoming folder.

That's the view set up, get tagging...

Tagging
With a file (or files) selected, little boxes appear in the Keywords pane.


They are initially greyed out. They are activated by pressing the F4 key, or by simply clicking inside one to apply, upon which, before applying the tag, MC will prompt you...


I start off like this, with thumbs, and batch tag things such as Events or Places. Once that's done, I like to right click the thumb slider to fit the image, tag it, cursor key down to move on to the next one, and so on.

Only click inside the tag boxes to apply the tag. If you click the tag itself, the view will filter by that tag and your place wll be lost, requiring you to reselect "All Keywords" and find your place in the list.

To add a new keyword, scroll to the bottom of the list and tick "New Keyword". Type your new keyword into the field that pops up. If you want it nested, enter the new keyword in the form of a Windows file address. If you type !Places\Edinburgh then when you press OK, Edinburgh will be added, nested under !Places. If you're starting from scratch, this may feel slow to begin with, but as your keywords list fleshes out, you'll be adding less and less, needing only to tick the box to apply the tag.

To remove a keyword, simply click in the tick box again.

I prefix the root of all nested groups with an exclamation mark. This forces them to the top of the list, which feels more natural to me.

Once a set of photos is tagged, select the files, right click, "Library Tools > Rename Move and Copy Files" and move the files to their final resting place. Refresh the view and the files will drop into the Finished group. Any new keywords added during this tagging session are still available for use for the next session.

There you have it, image keyword tagging. Supplementary tags, such as Caption, are filled using the tag window.

I will now outline some other essentials for my MC image library that you may or may not find useful...

Stacks
I do not use stacks for audio files. Only photos. Back in 2010, I explained what makes a stack tick.... The information there is still current today.

Here is my "Stack Manager" view.. To be honest, I don't visit it too often, but when I do, it's really handy to have.

"Set rules for file display" is
Code: [Select]
[Media Type]=[image] -[Stack Top]=-1 ~d=a ~sort=[Stack Top]Grouping is by a custom, calculated library field I called "Stack Locator", using the expression:
Code: [Select]
if(isequal([stack top],-1),Not Stacked,[stack top])Calender is another custom, calculated field, using the expression:
Code: [Select]
formatdate([date,0],yyyy\MM\dd,No Date)&datatype=[list]Expanded/Collapsed is an expression based pane using:
Code: [Select]
if(isempty([stack view]),Expanded,Collapsed)
If you choose to set one of these up, please read and understand the 'What makes a stack tick' link above.
I prefer this view over the official "right click > Stacks > Search for stack files" route for a couple of reasons...
1) The searched stack is automatically expanded, but not automatically collapsed. Over time, you'll end up bumping into unintentionally expanded stacks and it will begin to annoy you.
2) If you're not in the default image location in the tree, the search kicks you there. Yes, 'Back' gets you back where you were, but I don't like being bounced about in the tree.

MC has it's own rudimentary parametric image editor. I don't use it extensively as I can't be confident that the edits are applied whenever an edited image is exported via any of the many channels available, Facebook, Flickr, Pix01, FTP, email etc. I know that if you use MC to make a copy of an internally edited file, the edits are not applied to the copy. If like me, you prefer to use an external editor, you can set it up in MC so that when you use the "Send To > External" option, MC will make a copy of the original, appending "_EDIT" to the filename, and stack it with the original, as the stack top. This is really neat. The copy contains all of the tags of the original. Only thing to watch out for is that when you save any edits, tag data is often lost, remaining in the library only until another tag change forces the update, or you manually run the update tags from library tool.

For those sequences of photos where you have several very similar photos, but don't want to delete all but one, select them all, pick the one you want as the 'top file', right click on it, choose "Stacks > Stack Files". MC always stacks the 'right clicked' file as the stack top.

That's stacks. Essential for your image library. I skimmed a bit, so if there's any questions, just ask.

cont....

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Nested events - Image Library Tips
« Reply #8 on: June 06, 2014, 03:36:34 am »


On to the original question that led to this write up in the first place... How to extract key components from keywords when you've tagged everything in there, and is it all too much hassle?

I decided it was definately not too much hassle. I choose to put it all in keywords as I'm the one doing the tagging and I want that as easy as possible. Primarily, images are viewed on the TV using theater view, and as such, I need to cater for the family's demands too. They want views based around Events, or People, or Location, I must provide or they simply won't use it. I take a bit of time working it out, a bit of time bugging MrC (thank you sir), set it up, and from that point on, it's all maintenance free, automagically updating from the keywords field. I'll outline the three main fields, People, Places and Events...

Events

The stock fields cannot be edited, so we must create our own from scratch. I called mine "Occasion". I use regex to cull the required information from keywords. Note that the method outlined here will only catch one !Event entry, the first one that it encounters. I am comfortable with that as none of my files are tagged with multiple events, and I don't imagine they ever will be.

The custom, calculated field "Occasion" uses the following expression:
Code: [Select]
if(regex([keywords],/#(!Events[^;]+)#/,0),replace([R1],!Events\,),)&datatype=[list]Bear in mind that I use exclamation marks to keep nested data at the top of keywords lists, you should alter the expression to match your chosen root name. The expression captures everything from the first "!Events" it finds to the next semi-colon, and then removes the "!Events\" part of the captured string, leaving us with just the actual event.

Create an Image view called Occasions, "Set rules for file display" will be:
Code: [Select]
[media type]=image [=isequal([keywords],!Event,8)]=1 (Again, edit this to match your own chosen root name for Events).
Add your new "Occassion" category along with any other you desire, and you're all set. As you add events to the keywords field, they will auto-populate here too.


Places

Here, I use the same approach as above to cull place names from keywords. I can imagine having two place name tags here, but so far this has not been a problem for me. If you know this won't work for you, adopt the approach used for "People" below for you locations.
Create a custom calcualted field called Location using the expression:
Code: [Select]
if(regex([keywords],/#(!Places[^;]+)#/,0),replace([R1],!Places\,),)&datatype=[list]Again, this assumes you have used a nested keywords group with a root called !Places. Amend to fit if you chose something different.

Create an image view called Locations, "Set rules for file display" will be:
Code: [Select]
[media type]=image [=isequal([keywords],!Places,8)]=1 (Again, edit this to match your own chosen root name for Places).
Add your new "Location" category along with any other you desire, and you're all set. As you add places to the keywords field, they will auto-populate here too.


People

The neat and effective way regex is used to garner events and locations above will not work for people tags as there will invariably be more than one. It can still be done, and although the approach is quite crude, it still works without a problem.
Create a custom, calculated library field called Population using the expression:
Code: [Select]
listbuild(1,;,if(isequal(listitem([keywords],0,;),people,8),replace(listitem([keywords],0,;),!People\,),),if(isequal(listitem([keywords],1,;),people,8),replace(listitem([keywords],1,;),!People\,),),if(isequal(listitem([keywords],2,;),people,8),replace(listitem([keywords],2,;),!People\,),),if(isequal(listitem([keywords],3,;),people,8),replace(listitem([keywords],3,;),!People\,),),if(isequal(listitem([keywords],4,;),people,8),replace(listitem([keywords],4,;),!People\,),),if(isequal(listitem([keywords],5,;),people,8),replace(listitem([keywords],5,;),!People\,),),if(isequal(listitem([keywords],6,;),people,8),replace(listitem([keywords],6,;),!People\,),),if(isequal(listitem([keywords],7,;),people,8),replace(listitem([keywords],7,;),!People\,),),if(isequal(listitem([keywords],8,;),people,8),replace(listitem([keywords],8,;),!People\,),),if(isequal(listitem([keywords],9,;),people,8),replace(listitem([keywords],9,;),!People\,),),if(isequal(listitem([keywords],10,;),people,8),replace(listitem([keywords],10,;),!People\,),),if(isequal(listitem([keywords],11,;),people,8),replace(listitem([keywords],11,;),!People\,),),if(isequal(listitem([keywords],12,;),people,8),replace(listitem([keywords],12,;),!People\,),),if(isequal(listitem([keywords],13,;),people,8),replace(listitem([keywords],13,;),!People\,),),if(isequal(listitem([keywords],14,;),people,8),replace(listitem([keywords],14,;),!People\,),),if(isequal(listitem([keywords],15,;),people,8),replace(listitem([keywords],15,;),!People\,),),if(isequal(listitem([keywords],16,;),people,8),replace(listitem([keywords],16,;),!People\,),),if(isequal(listitem([keywords],17,;),people,8),replace(listitem([keywords],17,;),!People\,),),if(isequal(listitem([keywords],18,;),people,8),replace(listitem([keywords],18,;),!People\,),))&datatype=[list]This needs to go in the expression field 'inline' like this. If we break it out across multiple lines it's easier to see what's going on...

Code: [Select]
listbuild(1,;,
if(isequal(listitem([keywords],0,;),people,8),replace(listitem([keywords],0,;),!People\,),),
if(isequal(listitem([keywords],1,;),people,8),replace(listitem([keywords],1,;),!People\,),),
if(isequal(listitem([keywords],2,;),people,8),replace(listitem([keywords],2,;),!People\,),),
if(isequal(listitem([keywords],3,;),people,8),replace(listitem([keywords],3,;),!People\,),),
if(isequal(listitem([keywords],4,;),people,8),replace(listitem([keywords],4,;),!People\,),),
if(isequal(listitem([keywords],5,;),people,8),replace(listitem([keywords],5,;),!People\,),),
if(isequal(listitem([keywords],6,;),people,8),replace(listitem([keywords],6,;),!People\,),),
if(isequal(listitem([keywords],7,;),people,8),replace(listitem([keywords],7,;),!People\,),),
if(isequal(listitem([keywords],8,;),people,8),replace(listitem([keywords],8,;),!People\,),),
if(isequal(listitem([keywords],9,;),people,8),replace(listitem([keywords],9,;),!People\,),),
if(isequal(listitem([keywords],10,;),people,8),replace(listitem([keywords],10,;),!People\,),),
if(isequal(listitem([keywords],11,;),people,8),replace(listitem([keywords],11,;),!People\,),),
if(isequal(listitem([keywords],12,;),people,8),replace(listitem([keywords],12,;),!People\,),),
if(isequal(listitem([keywords],13,;),people,8),replace(listitem([keywords],13,;),!People\,),),
if(isequal(listitem([keywords],14,;),people,8),replace(listitem([keywords],14,;),!People\,),),
if(isequal(listitem([keywords],15,;),people,8),replace(listitem([keywords],15,;),!People\,),),
if(isequal(listitem([keywords],16,;),people,8),replace(listitem([keywords],16,;),!People\,),),
if(isequal(listitem([keywords],17,;),people,8),replace(listitem([keywords],17,;),!People\,),),
if(isequal(listitem([keywords],18,;),people,8),replace(listitem([keywords],18,;),!People\,),)
)&datatype=[list]
Basically, I've decided I won't ever have a file with more than 18 keyword tags. The expression checks each keyword entry to see if it contains "People" and if so, remove the !People\ bit and add what's left to the list.
If you believe you're likely to have more than 18 individual keywords attached to a single file, you'll need to add to the sequence. MC doesn't mind that list items 6 to 18 don't exist, the expression still works.
As before, remember that all expressions provided assume that you have used !People as the root of you nested keywords branch. Amend accordingly if you have used something different.

Create an image view called Population, "Set rules for file display" will be:
Code: [Select]
[media type]=image [=isequal([keywords],!People,8)]=1 (Again, edit this to match your own chosen root name for People).

Add your new "Population" category along with any other you desire, and you're all set. As you add people to the keywords field, they will auto-populate here too.


Head Count
This can be useful at times. It's an expression based pane here, using the expression:
Code: [Select]
if(isequal(listcount([keywords],!People),2),1 person,
if(isequal(listcount([keywords],!People),3),2 people,
if(isequal(listcount([keywords],!People),4),3 people,
if(isequal(listcount([keywords],!People),5),4 people,
if(isequal(listcount([keywords],!People),6),5 people,
if(isequal(listcount([keywords],!People),7),6 people,
if(isequal(listcount([keywords],!People),8),7 people,
if(isequal(listcount([keywords],!People),9),8 people,
if(isequal(listcount([keywords],!People),10),9 people,
if(isequal(listcount([keywords],!People),11),10 people,
if(isequal(listcount([keywords],!People),12),11 people,
if(isequal(listcount([keywords],!People),13),12 people,No People))))))))))))
Basically, it counts the keywords using !People as the delimiter. Again, amend accordingly if you have used something else as the root of your nested people branch, and extend accordingly if you need more people.

When sorting 'Newest First', sort 'Oldest First' by day.
This was a great setting in Elements that I kind of missed in MC. Although grouping has by and large superceded it, it's still a handy entry to have in your sorting presets. Here's how to get it in MC...

[date (filename friendly)] looks like so for me: yyyymmdd-hhmmss

I don't know if this changes with different Windows locale settings.

Create two new custom fields using calculated data, effectively splitting the data into seperate date and time info...

1. Time -  expression: mid([date (filename friendly)],9,-1)&DataType=[Number]
2. Date (no time) - expression: mid([date (filename friendly)],0,8)&DataType=[Number]

Set (and save as preset) sorting rules:
date (no time) (z-a)
time (a-z)

When applied, a list of non-grouped photos will be shown newest first, but in the order they were taken in on each day.

There you have it. The core of my MC image library. Take from it what you will. Maybe you think I'm crazy, maybe this is just the kick start you were looking for. Comments and questions are welcome.

Here's a quick Theater View Snapshot, showing the magic at work. All from a single keywords field, all automagic. Incidentally, while not mentioned above, I also keep my rating in keywords too, and drag them out into a field I called "Score". It's not hugely popular or useful though, so lately, I only use it flag exceptional photos. They get rated five, no other ratings are applied.

|

raldo

  • Citizen of the Universe
  • *****
  • Posts: 1102
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #9 on: June 07, 2014, 01:15:47 pm »

Thanks for the writeup, marko. Lots of good info here, indeed!
Logged

raldo

  • Citizen of the Universe
  • *****
  • Posts: 1102
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #10 on: June 07, 2014, 02:45:27 pm »

One question: I'm trying to figure out how to do field assignments on my keywords tags.

This does not work on this particular field. It works on other fields, though. Does anyone know how this can be done on the keywords tag?

Edit: I just realized that I can achieve this by creating an intermediate expression field. I then copy the contents of this field to the keywords field.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #11 on: June 08, 2014, 02:49:04 pm »



Head Count
This can be useful at times. It's an expression based pane here, using the expression:
Code: [Select]
if(isequal(listcount([keywords],!People),2),1 person,
if(isequal(listcount([keywords],!People),3),2 people,
if(isequal(listcount([keywords],!People),4),3 people,
if(isequal(listcount([keywords],!People),5),4 people,
if(isequal(listcount([keywords],!People),6),5 people,
if(isequal(listcount([keywords],!People),7),6 people,
if(isequal(listcount([keywords],!People),8),7 people,
if(isequal(listcount([keywords],!People),9),8 people,
if(isequal(listcount([keywords],!People),10),9 people,
if(isequal(listcount([keywords],!People),11),10 people,
if(isequal(listcount([keywords],!People),12),11 people,
if(isequal(listcount([keywords],!People),13),12 people,No People))))))))))))
Basically, it counts the keywords using !People as the delimiter. Again, amend accordingly if you have used something else as the root of your nested people branch, and extend accordingly if you need more people.

Here's an equivalent HeadCount expression that works for all cases:

ListItem(No People;math(listcount([keywords],!People) - 1) Person;math(listcount([keywords],!People) - 1) People, math(min(max(listcount([keywords],!People) - 1, 0),2)))
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #12 on: June 08, 2014, 02:51:48 pm »


[date (filename friendly)] looks like so for me: yyyymmdd-hhmmss

I don't know if this changes with different Windows locale settings.

Create two new custom fields using calculated data, effectively splitting the data into seperate date and time info...

1. Time -  expression: mid([date (filename friendly)],9,-1)&DataType=[Number]
2. Date (no time) - expression: mid([date (filename friendly)],0,8)&DataType=[Number]

Set (and save as preset) sorting rules:
date (no time) (z-a)
time (a-z)

FormatDate() now has time formatting specifiers, so you can get HH, MM, and SS values using it.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nested events - how to display, batch delete, batch assign, etc.
« Reply #13 on: June 08, 2014, 02:54:39 pm »

One question: I'm trying to figure out how to do field assignments on my keywords tags.

This does not work on this particular field. It works on other fields, though. Does anyone know how this can be done on the keywords tag?

Edit: I just realized that I can achieve this by creating an intermediate expression field. I then copy the contents of this field to the keywords field.


You can do field assignment to keywords, but you have to cast it to a STRING type.  Create an expression column, call it Keywords* and add the expression:

    [Keywords]&datatype=[string]

Now you can edit it w/out the list tagging interface.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up