[✅ Solution] How to get a Date Field via the Tape API Record.get

Hi there,
I am having a problem collecting Data from a Record. I use the following code to get certain Records of an Appointment App.

tape.Record.getManyFiltered({
appId: appId,
limit: 5,
filters: filters)}
Everything gets shown except of the date field which has a begin date, begin time, end date and end time. This is the result I am getting:
{“field_id”:494012,“external_id”:“beginnundende_70882”,“slug”:“beginnundende_70882”,“label”:“Beginn und Ende”,“type”:“date”,“field_type”:“range_date”,“config”:{“label”:“Beginn und Ende”,“slug”:“beginnundende_70882”,“external_id”:“beginnundende_70882”,“show_description”:false,“required”:true,“always_hidden”:false,“hidden_if_empty”:false,“settings”:{“calendar”:true,“time”:“enabled”,“end”:“enabled”,“is_due_date_of_status_field”:false}}}

Can anyone please help me :smiley:

Hi @tom.goeckeritz

I think I may be missing what is happening for you as it is doing what I would expect when I try:

[
  {
    "start": "2024-11-01 00:00:00",
    "start_date": "2024-11-01",
    "start_time": null,
    "start_utc": "2024-11-01 00:00:00",
    "start_date_utc": "2024-11-01",
    "start_time_utc": null,
    "end": "2024-11-01 00:00:00",
    "end_date": "2024-11-01",
    "end_time": null,
    "end_utc": "2024-11-01 00:00:00",
    "end_date_utc": "2024-11-01",
    "end_time_utc": null
  },
  {
    "start": "2024-11-01 21:00:00",
    "start_date": "2024-11-01",
    "start_time": "21:00:00",
    "start_utc": "2024-11-01 21:00:00",
    "start_date_utc": "2024-11-01",
    "start_time_utc": "21:00:00",
    "end": "2024-11-01 22:00:00",
    "end_date": "2024-11-01",
    "end_time": "22:00:00",
    "end_utc": "2024-11-01 22:00:00",
    "end_date_utc": "2024-11-01",
    "end_time_utc": "22:00:00"
  }
]

The top record doesn’t have times set, and the second record does. If I have a record with no date, then that field won’t be in the response at all.

not sure if that helps or not, let me know and we can delve deeper if need be :slight_smile:

[
  {
    "field_id": 503422,
    "external_id": "date",
    "label": "Date",
    "type": "date",
    "field_type": "range_date",
    "config": {
      "label": "Date",
      "slug": "date",
      "external_id": "date",
      "show_description": false,
      "required": false,
      "always_hidden": false,
      "hidden_if_empty": false,
      "settings": {
        "calendar": false,
        "time": "enabled",
        "end": "enabled",
        "is_due_date_of_status_field": false
      }
    },
    "values": [
      {
        "start": "2024-11-01 00:00:00",
        "start_date": "2024-11-01",
        "start_time": null,
        "start_utc": "2024-11-01 00:00:00",
        "start_date_utc": "2024-11-01",
        "start_time_utc": null,
        "end": "2024-11-01 00:00:00",
        "end_date": "2024-11-01",
        "end_time": null,
        "end_utc": "2024-11-01 00:00:00",
        "end_date_utc": "2024-11-01",
        "end_time_utc": null
      }
    ]
  },
  {
    "field_id": 503422,
    "external_id": "date",
    "label": "Date",
    "type": "date",
    "field_type": "range_date",
    "config": {
      "label": "Date",
      "slug": "date",
      "external_id": "date",
      "show_description": false,
      "required": false,
      "always_hidden": false,
      "hidden_if_empty": false,
      "settings": {
        "calendar": false,
        "time": "enabled",
        "end": "enabled",
        "is_due_date_of_status_field": false
      }
    },
    "values": [
      {
        "start": "2024-11-01 21:00:00",
        "start_date": "2024-11-01",
        "start_time": "21:00:00",
        "start_utc": "2024-11-01 21:00:00",
        "start_date_utc": "2024-11-01",
        "start_time_utc": "21:00:00",
        "end": "2024-11-01 22:00:00",
        "end_date": "2024-11-01",
        "end_time": "22:00:00",
        "end_utc": "2024-11-01 22:00:00",
        "end_date_utc": "2024-11-01",
        "end_time_utc": "22:00:00"
      }
    ]
  }
]
1 Like

Thanks Jason for your quick and detailed response. I am not sure what I did wrong, but it is working now! :smiley:

2 Likes