I know there’s a ‘check/tick box’ to do it for each person, but is there an option anywhere to automatically make first photo in a persons media list, the ‘primary’ photo ?
AS an explanation, I was a long-term RM7 user, didn’t like RM8 as far as data entry went, so moved to another program that I’d also used previously for building my trees (modesty forbids mentioning the name…) where it’s is an automatic process.
I’ve moved up to RM9, as I’m familiar - and fairly happy - with some of RM’s publishing options, so I periodically import a Gedcom to RM, with images, no real problems.
I just love all my Ancestors staring at me from the Pedigree and Family views, and it would be great not to have to re-tick/mark the ‘Primary’ box for each person every time I import a new .ged file.
*(It would, of course, be great if there could be a “changes since date” option with importing each new gedcom file, so I could then import the new data into an existing project without duplication, but if there is, I haven’t found that, either…)
SO - Anyone have a solution, or even a new approach, or maybe could this be considered a request for a future RM9 program feature…?
I do quite like my ‘alternative’ program, as far as data entry goes, so no chance of me moving completely (back) to RM9 in the near future, sorry !
Modesty does not prevent me from saying that I came up with an outboard solution a decade ago that one would think could have been readily incorporated in RM6 or whatever version was subsequent. It might still work on a RM9 database despite the changes to its structure. Visit https://sqlitetoolsforrootsmagic.com/media-set-primary-photo-for-persons/
TomH - thanks for that, I’ll give it a go, nothing to lose.
As a retired ‘techie’, I’m much more at home with unix scripts than SQL, but I’ve been nagging myself for a while about adding SQL to my diminishing skillset…
I note the mention of “last mediatag as the Primary photo”, how does that equate to the first picture in the list ? I’m impressed that gedcom brought the (links to) pictures across sorted in the same order as my other ‘modesty forbids’ program lists them.
The last mediatag does not equate to the first picture in the list; it would to the last if the list is in record order. I don’t recall whether RM9 lists in record order or only by filename or caption. At that time, I surmised that a user could readily make an image the last one by record order and that the last one added had a high probability of being the one wanted, e.g., a cropped version of one originally added, e.g., a headshot taken out of a group photo.
As a retired “techie”, you should find learning a little sql a breeze.
Thanks Tom, I ran it using SQLiteSpy, and it indeed set all the primary photos.
Small challenge in that it grabbed the last media for each individual, whereas the program it’s coming from ( what the heck, it’s Family Historian ) needs to see the headshot as the first.
Easy solution (apart from different script ) is to have a headshot as the first and last media item for each person in FH, no big deal, just looks like bookends as I display each persons media in FH - something I don’t seem to be able to do in RM9 ? Another wish ? sigh…
Anyway, thanks again, and for propelling me into SQL, another mystery unravelled, heheh…
If you reverse the sort order to
ORDER BY ML.OwnerID – sort by ownerid then
, ML.LinkID DESC
, ML.IsPrimary
it should pick the lowest link record number, i.e., the first media tagged to a person.
Glad it still works! Welcome to a whole new plate of spaghetti!
The more I look at SQL, I recognise the structures if not some of the syntax - but then I had to learn PHP to modify a website theme, and some bits look suspiciously like that…
Whats that old expression ?
“A little knowledge is a dangerous thing…”