* Displayin Flag In records Window

Homeless Posts from the old forum system
Locked
avatar
Johnyeates
Famous
Posts: 190
Joined: 19 Sep 2009 18:55
Family Historian: V6

Displayin Flag In records Window

Post by Johnyeates » 26 Oct 2010 16:05

Hi,
I have created Flags for each Family line and it would be usefull to be able to addthe flag to the Records Window (Individuals)
I can add each Family Flag, but this takes up several columns.
Is it possible to create a single column which will display which ever family line the individual is associated with?

Regards
John

ID:4839

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Displayin Flag In records Window

Post by Jane » 27 Oct 2010 07:36

You could build an expression, using TextIf and HasFlag and nest it for the number of flags you have.

avatar
Johnyeates
Famous
Posts: 190
Joined: 19 Sep 2009 18:55
Family Historian: V6

Displayin Flag In records Window

Post by Johnyeates » 27 Oct 2010 17:50

Thanks Jane,
I have almost got it working but am having a problem nesting the expressions, I can't quite get it right.
I can't find an example in the expressions manual.
Will you give me a hint please
Thanks
John

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Displayin Flag In records Window

Post by Jane » 27 Oct 2010 18:45

If you post what you have I'll look at it for you.

avatar
Johnyeates
Famous
Posts: 190
Joined: 19 Sep 2009 18:55
Family Historian: V6

Displayin Flag In records Window

Post by Johnyeates » 27 Oct 2010 23:00

Dear Jane,
This line works
=TextIf(HasFlag(%INDI%,'Yeates Line'),'Yeates')
It puts the text 'Yeates' against all the relations of the Yeates Family Line.

This Line does not work
=TextIf(HasFlag(%INDI%,'Yeates Line'),'Yeates') or =TextIf(HasFlag(%INDI%,'Akers Line'),'Akers')
Where I have used 'Or' to try to nest the expressions.

Where I am trying to 'Configure Columns' (in the Records Window (Individuals)) I only get a single line to write the expression, I can't wrap text.

Any help with the syntax would be appreciated.
Regards
John

avatar
nsw

Displayin Flag In records Window

Post by nsw » 27 Oct 2010 23:32

I suspect you need to 'nest' your TextIF using the 'Else' part (3rd parameter) of the TextIf function - I'm no FH function/query expert but my Excel knowledge suggests:

=TextIf(HasFlag(%INDI%,'Yeates Line'),'Yeates',TextIf(HasFlag(%INDI%,'Akers Line'),'Akers'))

So if they have the 'Yeates Line' flag then it shows 'Yeates' otherwise it carries out the other TextIf function.

avatar
Johnyeates
Famous
Posts: 190
Joined: 19 Sep 2009 18:55
Family Historian: V6

Displayin Flag In records Window

Post by Johnyeates » 28 Oct 2010 09:35

Nick,
Thanks for that, it workrd perfectly and, with the aid of Ctrl C & V, I extended it to all seven family lines in no time. When you think that all I needed was a simple commer to make it work, such a silly syntax error that I would never have found.
Thanks again
Regards
John

Locked