question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement: Use data files for choices

See original GitHub issue

Is your feature request related to a problem? Please describe. Data files can be set up to store things like author information (e.g. name, slug, url), but if you want to use this information in your front matter as a dropdown you have to set up this data in duplicate as choices to a choice field in frontMatter.taxonomy.contentTypes.

Describe the solution you’d like Add an option to use data files as the source for choice fields with key/value mapping.

Describe alternatives you’ve considered I don’t see any alternatives other than setting it up in duplicate or just manually entering the details instead of a choice dropdown.

Additional context For example set up an authors data file:

"frontMatter.data.files": [
  {
    "id": "authors",
    "title": "Authors",
    "file": "[[workspace]]/data/authors.json",
    "fileType": "json",
    "labelField": "name",
    "schema": {
      "title": "Authors",
      "type": "object",
      "required": [
        "slug",
        "name"
      ],
      "properties": {
        "slug": {
          "type": "string",
          "title": "Slug"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "url": {
          "type": "string",
          "title": "URL"
        }
      }
    }
  }
]

In the field configuration to store an ID/slug but display a name:

{
  "title": "Author",
  "name": "author-slug",
  "type": "choice",
  "dataSource": "authors",
  "key": "slug",
  "value": "name"
}

Or for displaying/storing only a string:

{
  "title": "Author",
  "name": "author-slug",
  "type": "choice",
  "dataSource": "authors",
  "value": "name"
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
barrymienycommented, May 18, 2022

That’s great news! I’ll check it out ASAP.

0reactions
estruyfcommented, May 25, 2022

It will be release in v7.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reusable Choices - Qualtrics
Importing Reusable Choices · In the Survey tab, click the Tools button. · Select Manage Reusable Choices. · Click Import From a File....
Read more >
Apple advances user security with powerful new data ...
“Advanced Data Protection is Apple's highest level of cloud data security, giving users the choice to protect the vast majority of their most ......
Read more >
Standards and Guidelines for Statistical Surveys - SAMHSA
A data management plan for the preservation of survey data, documentation, and information products as well as the authorized disposition of survey records....
Read more >
Power Pivot: Powerful data analysis and data modeling in Excel
Task In Excel In Pow... Edit data in a table Can edit values in individual cells in a table. Can't... Use Visual Basic for Applications...
Read more >
What Is Data Management and Why Is It Important? - TechTarget
Alternative data platforms to databases include file systems and cloud object ... made them the top database choice for transaction processing applications.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found