Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Access to column names #2

Closed
jayniz opened this issue Nov 14, 2015 · 6 comments
Closed

Feature Request: Access to column names #2

jayniz opened this issue Nov 14, 2015 · 6 comments

Comments

@jayniz
Copy link

jayniz commented Nov 14, 2015

It would be great to get access to column names and more metadata of sheets.

@jayniz jayniz changed the title Access to column names Feature Request: Access to column names Nov 14, 2015
@jasoncrawford
Copy link
Contributor

You mean you'd like to be able to query a sheet and see what fields it has? Can you describe a scenario where you would need that? We've been assuming that for most uses the fields are fixed and you know what they are.

@jayniz
Copy link
Author

jayniz commented Nov 15, 2015

Exactly that - would be useful for me to know some things about the columns (type, for example). Also, it would be great if they had an identifier independent from the column name.

Edit: same goes for the id column. We use "human readable" short ids in our sheets, so that when referencing a row from another sheet, we can identify the right row from its id (so the id is actually more like a short name or slug, in our case). This works nice when somebody edits a sheet. If I remember correctly, changing the id of a row also updates other rows referencing it. For an external service syncing sheets, though, it would be great to have stable ids for rows, so treating the id column in a sheet more like a unique, but mutable key.

@jasoncrawford
Copy link
Contributor

What's the scenario where the columns and types aren't fixed and known ahead of time? Can you describe the context around the use case?

Regarding stable ids for records: Each record should have an id attribute which is a short integer ID. This is permanent. Note that if you have a column named "ID", that column will shadow the id attribute. (We haven't solved the shadowing problem yet.)

@DeanWard
Copy link

I can provide an example use case. We have a dialling system for our agents to call targets and engage with them / collect information, deliver sales pitches, etc. The system has a flexible metadata system for projects so that a project that, for example, targets the fleet sector can contain information about a company's fleet size and makeup but a project that targets prospects for loans would contain information about creditworthiness, turnover, employee counts, etc.

Our importer is able to deal with multiple data sources and does a good job of transforming information automatically - I'd love to be able to extend that to yank data in from FB in the same flexible way so an API endpoint to query column information would be a huge help there.

@jasoncrawford
Copy link
Contributor

This is done! Sheets and fields can now be retrieved using the Fieldbook metadata API: https://github.com/fieldbook/api-docs/blob/master/metadata.md

Thanks all for the feedback.

@mlrawlings
Copy link

mlrawlings commented Apr 12, 2017

@jasoncrawford This is great! 🎉

However, it doesn't look like linked columns specify which sheet they are linked to?

I would expect a field object to also contain a linkedSheet property (or something similar) which is the id of sheet this field is linked to, if fieldType=link

EDIT: Opened a separate issue #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants