Given “App Type”, Retrieve Field Info?

Is there a way to get a list of field names for a “Thing” given the “App Type” (type of Thing)?

I noticed that an App Type property in the editor’s property panel is available to a plugin as a string in the form “custom.apptype”. Can information about the structure of a Thing be retrieved using that string?

Specifically, I’d like to get the name and label for the fields comprising the Thing. I don’t need data values – just the field names (internal) and labels (user-facing).

1 Like

Estoy buscando lo mismo, mi consejo es que por ahora utilices API connector y realices un get de tus datos (debes habilitarlo en settings/api)

https://myapp.bubbleapps.io/api/1.1/obj/field
https://myapp.bubbleapps.io/version-test/api/1.1/obj/field

saludos espero ayude

1 Like

Also wondering about this. Bumping the thread in case anyone has solved this.

What I’m wondering about specifically is this:

  • If you define a field as App Type
  • then define another field that is Fields of {your custom app type}
  • Then you can get the field name into the JS context.
  • But it won’t match the full, properly-cased property name you’d see in the database, and (more to the point for what I’m working on), this means it also won’t match what’s expected by the Data API Bulk create endpoint.

This seems odd to me. If you field is “Name”, for example, you need to use “Name” with the data api. But if getting a user to specify Type/Field names, ie using the plugin to get App Type → Fields of app_type, you’ll get “name_text”, which you can’t then use to access the Data API.

Is there some other way to get the “proper” field names out via a plugin action? Or is the only way to do this by specifying specific records of that type, then using .listProperties() ?

1 Like

Does it work if you uncheck the following option under SettingsAPI

Ohhhh…. Brilliant! I’ll check that out later. Thanks @sudsy !

1 Like