Answers.Body: <p>This <a href="https://github.com/australiangreens/au.org.greens.logexport" rel="nofollow noreferrer">Log Export extension</a> "logs to a files within the ConfigandLog directory whenever an export happens, who performed it what columns involved and the relevant entity IDs"</p>
  
  <p>There is a blog about it <a href="https://civicrm.org/blog/seamuslee/more-tracking-of-exports" rel="nofollow noreferrer">here</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T19:54:51.107Z
Answers.Text: I read the question as asking a different question - they want to be able to locate a subset of stuff added/edited in civicrm in the last 24 hours. That extension seems to serve a different purpose?
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T20:06:17.493Z
Answers.Text: Oh I see. You could use it as a way of making "24 hours" more exact, so that you're searching for changes since the last export.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-18T23:30:46.973Z
Answers.Text: i agree it is a bit of a tangential answer but had just come across the link again and remembered a couple of Q+A on here that it might be helpful to - even if only for others reading the Q rather than the original poster.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T03:49:03.630Z
Answers.LastActivityDate: 2019-01-17T19:10:39.283Z
Answers.LastEditDate: 2019-01-17T19:10:39.283Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>How are you recording the enquiry?  As an activity?  If so, you could add a custom field "exported" (Yes/No field, default No), then search for exported=no, export, and update exported=yes.</p>
  
  <p>There are various problem scenarios you might want to think about: eg if an export is lost after you generate it (eg email bounces), do you need to be able to reproduce an export?  How important is it to make sure you export every enquiry once, and once only?  If you need a robust process you could take a look at how <a href="https://docs.civicrm.org/user/en/latest/contributions/accounting-integration/" rel="nofollow noreferrer">Accounting Batches</a> manages exports of contributions.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-28T15:14:50.073Z
Answers.Text: Danger Will Robinson!
  Custom fields should be avoided at all costs for a myriad of reasons, not the least of which are:
  ***The field names will be different depending on the region you add them to
  --already_exported will be saved as already_exported_587 (or similar) and the number will change in each environment. Dev might be 587, but production will be 621 etc. If you end up writing code against this field, you'll be in random-field-name-hell. >shudder<
  
  ***No guarantee that custom fields will work the same way in CiviCRM 6
  
  Never use custom fields if you have other options.
Answers.UserDisplayName: Neil Davis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-29T16:35:55.767Z
Answers.Text: @NeilDavis Custom fields are fully supported and an integral part of CiviCRM and you'll find them on any significant implementation.  There are some challenges programming with them and plenty of scope for writing poor code but you might want to ask some questions around good practice for coding with custom fields if you can't find what you need in the documentation.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-10T18:59:14.810Z
Answers.LastActivityDate: 2019-01-10T18:59:14.810Z
Answers.UserDisplayName: Aidan
Body: <p>I am looking for a way to mark data as exported in some way.</p>
  
  <p>The scenario is that we are receiving and capturing data for enquirers (people making enquiries) on behalf of a third party.</p>
  
  <p>The 3rd party doesn't have access to the system (and are not allowed to be given log in - apparently this is a 'politics' reason) however need to be given an extract of all the people who have made contact in the last 24 hours.</p>
  
  <p>Ideally I would like to pull a report (automatically generate a CSV file perhaps) but mark the data in some way with an exported flag or date so we can show it has been exported.</p>
  
  <p>Any suggestion as to how I could do this?</p>
  
  <p>(Open to other suggestions such as an export that sets an activity as completed or something too, or something that can be developed by the API)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-08T13:08:37.010Z
Comments.Text: if you are pulling a report then better to use date range - which will give you only for the selected date. so you can run everyday
Comments.UserDisplayName: Ramesh - ARTECH Consultancy
Tags: <civireport><export><csv>
Title: Extracting a report/pulling a search result to CSV but setting an exported flag to indicate this
ThreadText: # Extracting a report/pulling a search result to CSV but setting an exported flag to indicate this
  
  (Asked by: username_0 on 2019-01-08)
  
  I am looking for a way to mark data as exported in some way.
  
  The scenario is that we are receiving and capturing data for enquirers (people making enquiries) on behalf of a third party.
  
  The 3rd party doesn't have access to the system (and are not allowed to be given log in - apparently this is a 'politics' reason) however need to be given an extract of all the people who have made contact in the last 24 hours.
  
  Ideally I would like to pull a report (automatically generate a CSV file perhaps) but mark the data in some way with an exported flag or date so we can show it has been exported.
  
  Any suggestion as to how I could do this?
  
  (Open to other suggestions such as an export that sets an activity as completed or something too, or something that can be developed by the API)
  
  **Tags:** civireport, export, csv
  
  > **Comments:**
  > **username_1**: if you are pulling a report then better to use date range - which will give you only for the selected date. so you can run everyday  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-01-17. Score: 3
  
  This [Log Export extension](https://github.com/australiangreens/au.org.greens.logexport) "logs to a files within the ConfigandLog directory whenever an export happens, who performed it what columns involved and the relevant entity IDs"
  
  There is a blog about it [here](https://civicrm.org/blog/seamuslee/more-tracking-of-exports)
  
  > **Comments:**
  > **username_3**: I read the question as asking a different question - they want to be able to locate a subset of stuff added/edited in civicrm in the last 24 hours. That extension seems to serve a different purpose?  
  > **username_3**: Oh I see. You could use it as a way of making "24 hours" more exact, so that you're searching for changes since the last export.  
  > **username_2**: i agree it is a bit of a tangential answer but had just come across the link again and remembered a couple of Q+A on here that it might be helpful to - even if only for others reading the Q rather than the original poster.  
  
  ---
  
  ### Answer by username_4 on 2019-01-10. Score: 2
  
  How are you recording the enquiry? As an activity? If so, you could add a custom field "exported" (Yes/No field, default No), then search for exported=no, export, and update exported=yes.
  
  There are various problem scenarios you might want to think about: eg if an export is lost after you generate it (eg email bounces), do you need to be able to reproduce an export? How important is it to make sure you export every enquiry once, and once only? If you need a robust process you could take a look at how [Accounting Batches](https://docs.civicrm.org/user/en/latest/contributions/accounting-integration/) manages exports of contributions.
  
  > **Comments:**
  > **username_5**: Danger Will Robinson! Custom fields should be avoided at all costs for a myriad of reasons, not the least of which are: ***The field names will be different depending on the region you add them to --already_exported will be saved as already_exported_587 (or similar) and the number will change in each environment. Dev might be 587, but production will be 621 etc. If you end up writing code against this field, you'll be in random-field-name-hell. >shudder<  ***No guarantee that custom fields will work the same way in CiviCRM 6  Never use custom fields if you have other options.  
  > **username_4**: @NeilDavis Custom fields are fully supported and an integral part of CiviCRM and you'll find them on any significant implementation.  There are some challenges programming with them and plenty of scope for writing poor code but you might want to ask some questions around good practice for coding with custom fields if you can't find what you need in the documentation.  
  
  ---
  
  