Hello,
I created a custom EVENT to display the Interment of individuals.
I need to have the Interment DATE and the Interment NUMBER .
My custom events shows the number but it is NOT a number I thinks it is sorting as TEXT .
I cant see a way to force the event NUMBER as a Number .
My sort on the number field reveals in sequence 1002799 , 1003, 1003629 , 10057 how can I make it NUMERIC and sort low to high
Thank you for considering my dilemma
Darryl
* Custom Events fields
- Valkrider
- Megastar
- Posts: 1534
- Joined: 04 Jun 2012 19:03
- Family Historian: V7
- Location: Lincolnshire
- Contact:
Re: Custom Events fields
The typical way to do this in any computer programme is to pad the number with leading or trailing zero's (whichever is appropriate in the individual case) so they are all the same length. They will then sort properly.
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Re: Custom Events fields
Did you mean an Event or an Attribute?
Are you sorting them in a Query? If so have you tried wrapping the data reference with the =number() function?
Are you sorting them in a Query? If so have you tried wrapping the data reference with the =number() function?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27085
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Custom Events fields
Unfortunately the =Number(...) function does not produce a text display in a Query column.
However, the =TextToNumber(...) function works perfectly.
So if the Interment Number is the Value of your custom Interment Attribute the Expression would be:
=TextToNumber(FactValue(%FACT%)) in the Columns tab of a Fact Query.
However, if other Attribute facts have non-numeric Values, then they will not display correctly.
So what seems to work is two Columns :-
=TextToNumber(FactValue(%FACT%)) Sort: Ascending Type: Hidden
=FactValue(%FACT%) Sort: Ascending Type: Normal
However, the =TextToNumber(...) function works perfectly.
So if the Interment Number is the Value of your custom Interment Attribute the Expression would be:
=TextToNumber(FactValue(%FACT%)) in the Columns tab of a Fact Query.
However, if other Attribute facts have non-numeric Values, then they will not display correctly.
So what seems to work is two Columns :-
=TextToNumber(FactValue(%FACT%)) Sort: Ascending Type: Hidden
=FactValue(%FACT%) Sort: Ascending Type: Normal
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry