What is the best way to get the ID of drop down options?

I’m looking to create a program that updates many records at once in my contacts database. I currently have three single-select fields that I’d like to map responses to.
When I get the schema via api, it does not appear to include the drop-down “sub-types.” I’d like to expedite finding the associated IDs for each of the options in all three drop downs.
Any recommendations of best practice here?

The options for a single select are in effect entities of the single select database (a.k.a. type) so querying the schema will not get you them. You need to do an entity query to find out the ids of each option.

Thanks @Chr1sG
I was having trouble querying for the dropdowns but tried the Fibery type instead of the fibery/name value and was successful. Example below for people in the future:

{
      "command": "fibery.entity/query",
      "args": {
        "query": {
          "q/from": "${app}/${dropdownName}_${app}/{$typeName}",
          "q/select": ["fibery/rank","enum/name","fibery/id"],
          "q/limit": 10
        }
      }
}
1 Like

I’ve struggled with this before too. I had to look at the incoming HTTP requests from Fibery to find the UUID’s of options in various dropdowns/selects.

It would be handy if there was some [Item UUID] argument for formulas. That way we could easily just create a temporary field to copy the ID when opening the field. That or some keyboard shortcut to hold while clicking on an option to copy its UUID to clipboard—or perhaps some hidden field for when you hold ALT and click “New Field or Relation”

2 Likes

I guess you’ve probably have thought of it, but you could make text field (called UUID) and define a scheduled automation to get the ID. Then just ‘Run now’ to populate all of them at once:

This is quite creative. I think it’s a great way for people who are not using the API to extract the information.