Page 1 of 1
Expression for source ID to Query
Posted: 09 Feb 2008 21:58
by paulrun262
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
Expression for source ID to Query
Posted: 09 Feb 2008 22:28
by Jane
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
Expression for source ID to Query
Posted: 09 Feb 2008 23:45
by paulrun262
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.
Expression for source ID to Query
Posted: 10 Feb 2008 09:15
by Jane
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>%)
Expression for source ID to Query
Posted: 29 May 2009 09:20
by SabineS
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
Expression for source ID to Query
Posted: 29 May 2009 09:31
by SabineS
... 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
Expression for source ID to Query
Posted: 29 May 2009 10:50
by Bilko
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]