* Expression for source ID to Query

Older V4 Queries please post for any version in the General Forum
Locked
avatar
paulrun262
Silver
Posts: 6
Joined: 27 Jan 2008 10:29
Family Historian: None

Expression for source ID to Query

Post by paulrun262 » 09 Feb 2008 21:58

I'm not that good with queries but would like to add the standard source ID to a custom query. Any ideas?

Thanks in advance.

ID:2748

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

Expression for source ID to Query

Post by Jane » 09 Feb 2008 22:28

I think you need to explain what you are trying to do, you can't attach a source to a Custom id, or are you looking to copy the normal ID of a source to the custom ID for a source. If it's the latter you could use the Work with Record ID's tool to copy the source ID's
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
paulrun262
Silver
Posts: 6
Joined: 27 Jan 2008 10:29
Family Historian: None

Expression for source ID to Query

Post by paulrun262 » 09 Feb 2008 23:45

Sorry, I did not really explain that well. I would just like the Record ID (source records)to appear in the result set of a query.

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

Expression for source ID to Query

Post by Jane » 10 Feb 2008 09:15

Ok, if you are meaning against a source which is attached to an event. First insert the source for an event in the normal way.

Then wrapper the resulting source data reference with =recordid(% %)
eg for a birth source

INDI.BIRT.SOUR>
becomes
=RecordId(%INDI.BIRT.SOUR>%)
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
SabineS
Diamond
Posts: 67
Joined: 11 Jan 2005 14:17
Family Historian: None

Expression for source ID to Query

Post by SabineS » 29 May 2009 09:20

I just stumbled across a similar problem ... in a source query, is there a way to get that RecordId for the source?

I tried '=RecordID(%SOUR%)', but that didn't work.

What I want is extracting sources which have numbers between X and Y, for example.

Sabine

avatar
SabineS
Diamond
Posts: 67
Joined: 11 Jan 2005 14:17
Family Historian: None

Expression for source ID to Query

Post by SabineS » 29 May 2009 09:31

... another option would be listing all sources that are referred to in a given list of individuals (named lists), and then maybe limit by the LastUpdated condition. But how do I get the sources referred to in individual records from a named list?

Sabine

avatar
Bilko
Diamond
Posts: 69
Joined: 04 May 2009 20:03
Family Historian: None

Expression for source ID to Query

Post by Bilko » 29 May 2009 10:50

Hi Paul & Sabine,

I've just tried Jane's previous answer and have a query which includes the Source ID number for the individuals Birth Source. If required this could be used within the 'Rows' tab to get the limits (as Sabine requested).

However, I have had a problem like this before. Where I wanted, say, all the churches used for Baptisms, Weddings & Burials (with their associated event listed) you cannot just look for 'churches'. What is required is a search for each type of event - so I created a query for churches used for Baptisms, another query for churches used for Weddings etc. etc. The result set for each query could then be added to a named list or exported to Excel (say) for analysis.

So - to answer Sabine's last question,

> create an 'individual' query with each of the required source IDs as columns (as Jane described earlier),

> Use the List Tab of the Rows tab within the query to restrict the individuals required to be in a Named List.

> If the lastupdated function is required, it may be easiest to include a column for the relevant item {such as =LastUpdated(%INDI%)} and to apply limitations using the Rows Tab.

Hope this has been helpful

Bilko [cool]

Locked