Here's one for someone who is good at creeating expressions (Not Me)
I would like to use an expression to display an icon to show that there are any Individual Census Facts that do not have an image associated with it.
I do not need a different expression for each year, just one icon to show that an individual has at least one census fact with no image (I use AS method 2, but have only just started adding images, so want to go back through all my records)
Any help greatly appreciated
ID:6249
* Challenging Expression
- johnmorrisoniom
- Megastar
- Posts: 882
- Joined: 18 Dec 2008 07:40
- Family Historian: V7
- Location: Isle of Man
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Challenging Expression
I assume you are adding images using the Camera icon associated with Facts.
The Expression would be based on the following, but all entered on one line in the Condition:
=IsTrue(
(Exists(%INDI.CENS[1]%) and Not(Exists(%INDI.CENS[1].OBJE>%))) or
(Exists(%INDI.CENS[2]%) and Not(Exists(%INDI.CENS[2].OBJE>%))) or
(Exists(%INDI.CENS[3]%) and Not(Exists(%INDI.CENS[3].OBJE>%)))
)
but will need to be extended to cover CENS[4], CENS[5], et seq, depending how many Census Facts any one Individual may have.
The Expression would be based on the following, but all entered on one line in the Condition:
=IsTrue(
(Exists(%INDI.CENS[1]%) and Not(Exists(%INDI.CENS[1].OBJE>%))) or
(Exists(%INDI.CENS[2]%) and Not(Exists(%INDI.CENS[2].OBJE>%))) or
(Exists(%INDI.CENS[3]%) and Not(Exists(%INDI.CENS[3].OBJE>%)))
)
but will need to be extended to cover CENS[4], CENS[5], et seq, depending how many Census Facts any one Individual may have.
- johnmorrisoniom
- Megastar
- Posts: 882
- Joined: 18 Dec 2008 07:40
- Family Historian: V7
- Location: Isle of Man
Challenging Expression
Thanks Mike,
I had a go myself, and had something similar, but i must have been making a syntax error somewhere, because I kept getting 'Invalid Expression'.
I think 10 census items should cover the majority of cases.
Is there a character limit to expressions, because this is going to be quite long.
I think I'll build in in notepad first, then cut and paste.
Thanks for your help
I had a go myself, and had something similar, but i must have been making a syntax error somewhere, because I kept getting 'Invalid Expression'.
I think 10 census items should cover the majority of cases.
Is there a character limit to expressions, because this is going to be quite long.
I think I'll build in in notepad first, then cut and paste.
Thanks for your help
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Challenging Expression
Yes, building in Notepad is what I do.
There may be a limit to Expression length, but because this is an or condition, you can split it across several Conditions and get the same effect (I think).
The first Condition Expression to satisfy IsTrue(...) will display the Icon.
But if false, will continue to next Condition Expression...
Might be logical to have one Condition Expression for each Census instance.
There may be a limit to Expression length, but because this is an or condition, you can split it across several Conditions and get the same effect (I think).
The first Condition Expression to satisfy IsTrue(...) will display the Icon.
But if false, will continue to next Condition Expression...
Might be logical to have one Condition Expression for each Census instance.
- johnmorrisoniom
- Megastar
- Posts: 882
- Joined: 18 Dec 2008 07:40
- Family Historian: V7
- Location: Isle of Man
Challenging Expression
I have strung it all together as one line and it works well, as far as I can tell.
At least I know that my original thinking was along the right lines.
Thanks again
At least I know that my original thinking was along the right lines.
Thanks again