* Edit Text Scheme problem
Edit Text Scheme problem
Oh dear. I think I shouldn't have started this. Looks as if you spent a whole day getting that done, but respect, it looks quite good.
You should have added a 'bef 1911' aswell as a 'aft Jul 1920' line aswell in the pic, since that's the ones left unsolved.
1 day till weekend ... I'll take over this very interesting solution on saturday.
Which reminds me about the following. Is there any Editor with a syntax highlighting definition working with the scripting?
Have to modify the FH resources using a resouce editor anyway (did so with v3 and v4) to re-order some of the windows such as the indivials main tab so I can enter birt,chr,deat one after the other. Always reaching for the Detail tab is very ugly.
Reporting bugs, well, I think besides these issues it'll be much more of a help if in the Text Scheme Edit window the left side should be collapsable so that once one selected something from the left side, on got the full width of the window for working at the template line.
The other idea would be to auto-ignore return and space characters or tabs and make the template line itself a multiline fields, so that one could build tamplates similar to a program language with splitting up lines and indenting them for easier reading, like:
=IfText(something > 0,
dothis
,
dothat
)
I know it won't be that easy due to script items such as concatenating using ' . ', but at the moment it's somewhat ugly to work with lines of 350-400chars.
So your latest idea is usefull on it's own since not being such a mosterline which I always need to put into seperate ones to get it's sense.
And answering your qeustion 1 posting earlier. Lucky me, I totally avoid using From ... To or between date entries. I always try to keep things straight using either a full date or calc, est, app. if ever.
Despite all these things which could be improoved, the best thing on FH remains ... one can't do anything close to this with any other genealogy product as far as I know.
You should have added a 'bef 1911' aswell as a 'aft Jul 1920' line aswell in the pic, since that's the ones left unsolved.
1 day till weekend ... I'll take over this very interesting solution on saturday.
Which reminds me about the following. Is there any Editor with a syntax highlighting definition working with the scripting?
Have to modify the FH resources using a resouce editor anyway (did so with v3 and v4) to re-order some of the windows such as the indivials main tab so I can enter birt,chr,deat one after the other. Always reaching for the Detail tab is very ugly.
Reporting bugs, well, I think besides these issues it'll be much more of a help if in the Text Scheme Edit window the left side should be collapsable so that once one selected something from the left side, on got the full width of the window for working at the template line.
The other idea would be to auto-ignore return and space characters or tabs and make the template line itself a multiline fields, so that one could build tamplates similar to a program language with splitting up lines and indenting them for easier reading, like:
=IfText(something > 0,
dothis
,
dothat
)
I know it won't be that easy due to script items such as concatenating using ' . ', but at the moment it's somewhat ugly to work with lines of 350-400chars.
So your latest idea is usefull on it's own since not being such a mosterline which I always need to put into seperate ones to get it's sense.
And answering your qeustion 1 posting earlier. Lucky me, I totally avoid using From ... To or between date entries. I always try to keep things straight using either a full date or calc, est, app. if ever.
Despite all these things which could be improoved, the best thing on FH remains ... one can't do anything close to this with any other genealogy product as far as I know.
- tatewise
- Megastar
- Posts: 27082
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Edit Text Scheme problem
The Templates do cope with ALL the Date Formats, including Calculated, Estimated, Approx, Between, Before, After, From, To, Phrase, etc.
I simply did not include examples of them all in the picture.
I presume you use Customised Tabs to redesign the Property Box.
Yes, the Text Scheme Editor is very ugly.
You can always propose changes via the Wish List Requests Forum.
I simply did not include examples of them all in the picture.
I presume you use Customised Tabs to redesign the Property Box.
Yes, the Text Scheme Editor is very ugly.
You can always propose changes via the Wish List Requests Forum.
Edit Text Scheme problem
tatewise you're a genius [grin]
with splitting up the things I even got more control of what get's displayed at which location.
I used the dates followed by the place.
Then I'm able to say .. if previous line blank (the place)
your qualifier template (same line, group with previous, only if prev. blank)
followed by a
your qualifier template (with new line, goup with previous)
but surrounded by
=TextIf(IsSet(%INDI.BIRT.PLAC%),{your qualifier template},)
which gives me a 1-liner if plac or qualifier is available and a 2 line if both are present, being plac always on top of the qualifier.
And best of all, it's all short (better said not too longish) templatelines.
Not to mention I learned that
=TextIf(Exist(%INDI.BIRT.PLAC%, .....
if a pretty poor contruct against
=TextIf(IsSet(%INDI.BIRT.PLAC%, ....
since I tested my templates by modifiying an individuals PLAC by simply wiping it from the Individuals Mein Tab from within the diagram, and did wonder some minutes why my templates didn't work at all. The PLAC was still in the record, and Exist failed since being empty isn't being unavailable.
Conclusion ... playing with some help from your side, one gets closer and closer to what one wants, while also improoving the templating skills.
with splitting up the things I even got more control of what get's displayed at which location.
I used the dates followed by the place.
Then I'm able to say .. if previous line blank (the place)
your qualifier template (same line, group with previous, only if prev. blank)
followed by a
your qualifier template (with new line, goup with previous)
but surrounded by
=TextIf(IsSet(%INDI.BIRT.PLAC%),{your qualifier template},)
which gives me a 1-liner if plac or qualifier is available and a 2 line if both are present, being plac always on top of the qualifier.
And best of all, it's all short (better said not too longish) templatelines.
Not to mention I learned that
=TextIf(Exist(%INDI.BIRT.PLAC%, .....
if a pretty poor contruct against
=TextIf(IsSet(%INDI.BIRT.PLAC%, ....
since I tested my templates by modifiying an individuals PLAC by simply wiping it from the Individuals Mein Tab from within the diagram, and did wonder some minutes why my templates didn't work at all. The PLAC was still in the record, and Exist failed since being empty isn't being unavailable.
Conclusion ... playing with some help from your side, one gets closer and closer to what one wants, while also improoving the templating skills.
- tatewise
- Megastar
- Posts: 27082
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Edit Text Scheme problem
I am glad to help. I must admit I was a professional software engineer before retiring.
Remember to test with ALL the Date Formats, including Calculated, Estimated, Approx, Before, After, From, To, etc.
May I say your English is very good, much better than my German [smile]
Remember to test with ALL the Date Formats, including Calculated, Estimated, Approx, Before, After, From, To, etc.
May I say your English is very good, much better than my German [smile]
Edit Text Scheme problem
Still got a problem.
=TextIf(NullDate(%INDI.FAMS[1+]>MARR.DATE:XDATE1%),Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) MARR.DATE:XDATE2%)),Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) MARR.DATE:XDATE1%))).
fails with the error tooooooo long
so I think I must use
=TextIf(NullDate(%INDI.FAMS[1+]>MARR.DATE:XDATE1%),Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) MARR.DATE:XDATE2%)),).
plus
=TextIf(NullDate(%INDI.FAMS[1+]>MARR.DATE:XDATE1%),,Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) MARR.DATE:XDATE1%))).
instead?
I'm a bit unsure about testing these if they really work.
=TextIf(NullDate(%INDI.FAMS[1+]>MARR.DATE:XDATE1%),Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) MARR.DATE:XDATE2%)),Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) MARR.DATE:XDATE1%))).
fails with the error tooooooo long
so I think I must use
=TextIf(NullDate(%INDI.FAMS[1+]>MARR.DATE:XDATE1%),Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE2%) MARR.DATE:XDATE2%)),).
plus
=TextIf(NullDate(%INDI.FAMS[1+]>MARR.DATE:XDATE1%),,Text(TextIf((Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) > 0) and (Day(%INDI.FAMS[1+]>MARR.DATE:XDATE1%) MARR.DATE:XDATE1%))).
instead?
I'm a bit unsure about testing these if they really work.
Edit Text Scheme problem
And some other interesting bits found:
Instead of
Name Template: Displays Event Name i.e. Born, Married, Died, etc,
=ExistsText(%INDI.BIRT[1]%,'Born:')
I found that when it comes to marriage
=ExistsText(%INDI.FAMS[1+]>MARR%,'Marr.:')
fails, since it only displays 'Marr.' in case a spouse is linked but no place nor date information is given.
I found that using
=TextIf(IsSet(%INDI.FAMS[1+]>MARR.DATE%) or IsSet(%INDI.FAMS[1+]>MARR.PLAC%),'Marr.:',)
prevents the line while enabling it when one or both items are present.
And something tatewise might enlighen me, from my previous post.
Why does
=TextIf(NullDate(%INDI.BIRT[1].DATE:XDATE1%),Text(TextIf((Day(%INDI.BIRT[1].DATE:XDATE2%) > 0) and (Day(%INDI.BIRT[1].DATE:XDATE2%) 0) and (Day(%INDI.BIRT[1].DATE:XDATE1%) 0) and (Day(%INDI.BIRT[1].DATE:XDATE2%) 0) and (Day(%INDI.BIRT[1].DATE:XDATE1%) < 10),'0',) . Day(%INDI.BIRT[1].DATE:XDATE1%)),).
fails.
I assumed that
if testing against NullDate XDATE1 and if true output XDATE2
is the same but
if testing against NullDate XDATE2 and if true output XDATE1
but it didn't work at all.
Instead of
Name Template: Displays Event Name i.e. Born, Married, Died, etc,
=ExistsText(%INDI.BIRT[1]%,'Born:')
I found that when it comes to marriage
=ExistsText(%INDI.FAMS[1+]>MARR%,'Marr.:')
fails, since it only displays 'Marr.' in case a spouse is linked but no place nor date information is given.
I found that using
=TextIf(IsSet(%INDI.FAMS[1+]>MARR.DATE%) or IsSet(%INDI.FAMS[1+]>MARR.PLAC%),'Marr.:',)
prevents the line while enabling it when one or both items are present.
And something tatewise might enlighen me, from my previous post.
Why does
=TextIf(NullDate(%INDI.BIRT[1].DATE:XDATE1%),Text(TextIf((Day(%INDI.BIRT[1].DATE:XDATE2%) > 0) and (Day(%INDI.BIRT[1].DATE:XDATE2%) 0) and (Day(%INDI.BIRT[1].DATE:XDATE1%) 0) and (Day(%INDI.BIRT[1].DATE:XDATE2%) 0) and (Day(%INDI.BIRT[1].DATE:XDATE1%) < 10),'0',) . Day(%INDI.BIRT[1].DATE:XDATE1%)),).
fails.
I assumed that
if testing against NullDate XDATE1 and if true output XDATE2
is the same but
if testing against NullDate XDATE2 and if true output XDATE1
but it didn't work at all.
- tatewise
- Megastar
- Posts: 27082
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Edit Text Scheme problem
In answer to your earlier 1st posting, 'Yes' your solution is perfect.
I had the same problem with my Day1 Template and Month1 Template for the Marriage Event.
I cannot reproduce your =ExistsText(%INDI.FAMS[1+]>MARR%,'Marr.:') problem.
It only fails to display Marr.: if there is no Marriage Event.
If there is a Marriage Event, with no Date and no Place, then Marr.: is displayed.
The clue to testing your 1st Templates, and why your 2nd Templates will not work, is in the FH Help > Family Historian Help > Using Family Historian > General Topics > Date Formats.
Scroll to the bottom where XDATE1 and XDATE2 and XDATETYPE are tabulated.
e.g.
For a simple Date you will see that XDATE1 = XDATE2 = NOT Null, so nothing is displayed by your 2nd Templates.
In other words, your 2nd Templates only display a Date if XDATE1=Null (To and Before) or XDATE2=Null (From and After).
To test the Date Templates you need to have each XDATETYPE in your Event Date fields, by using the Date Entry Assistant.
I was also a professional software testing engineer, and creating comprehensive tests was often harder than creating the original software.
I had the same problem with my Day1 Template and Month1 Template for the Marriage Event.
I cannot reproduce your =ExistsText(%INDI.FAMS[1+]>MARR%,'Marr.:') problem.
It only fails to display Marr.: if there is no Marriage Event.
If there is a Marriage Event, with no Date and no Place, then Marr.: is displayed.
The clue to testing your 1st Templates, and why your 2nd Templates will not work, is in the FH Help > Family Historian Help > Using Family Historian > General Topics > Date Formats.
Scroll to the bottom where XDATE1 and XDATE2 and XDATETYPE are tabulated.
e.g.
For a simple Date you will see that XDATE1 = XDATE2 = NOT Null, so nothing is displayed by your 2nd Templates.
In other words, your 2nd Templates only display a Date if XDATE1=Null (To and Before) or XDATE2=Null (From and After).
To test the Date Templates you need to have each XDATETYPE in your Event Date fields, by using the Date Entry Assistant.
I was also a professional software testing engineer, and creating comprehensive tests was often harder than creating the original software.
Edit Text Scheme problem
Yep, that's what I wanted to say.tatewise said:
I cannot reproduce your =ExistsText(%INDI.FAMS[1+]>MARR%,'Marr.:') problem.
It only fails to display Marr.: if there is no Marriage Event.
If there is a Marriage Event, with no Date and no Place, then Marr.: is displayed.
If displaying a 'Marr.:' line on it's own is as if I would start indi boxes with 'Birth:' since it's obvious an indi was born otherwise it couldn't exist.
Same applies for Occupation, Place, and most likely christening and burried, I could always display the heading without information, but I wanted to archive to only output lines backed by data.
Example: You work in the diagram, create a new indi, let's say a father of an existing indi.
You know the christening date (child christening) but not the birth date. You accidently enter the christening date into the birth field. Press enter or TAB, and it's set.
You then realise the fault, wipe the birth date field and enter the christening date into the correct field.
The result will look like this:
Birth:
Christ: 11.11.1611
Since, FH keep blank event and attribute entries against auto-removing them straight. If you make use of IsSet against Exists then 'Birth:' is ommitted, which I rate more ideal.
But perhaps I've overlooked an option in FH which auto-removes blank attributes or events from the indi records or fam records. Haven't digged through all new features in v5 so I'm mostly aware of what v4 did offer.
- tatewise
- Megastar
- Posts: 27082
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Edit Text Scheme problem
FH does NOT auto-remove blank Facts, but you can do it yourself:
In the Property Box open the Facts tab, select the blank Fact(s) (Birth, Marriage, etc), and click the Delete Fact(s) icon X below.
Also your IsSet() method will hide blank Facts.
But you must test IsSet() for every field that may be displayed.
e.g. With Death Events you must test Date and Place and Cause.
In the Property Box open the Facts tab, select the blank Fact(s) (Birth, Marriage, etc), and click the Delete Fact(s) icon X below.
Also your IsSet() method will hide blank Facts.
But you must test IsSet() for every field that may be displayed.
e.g. With Death Events you must test Date and Place and Cause.