Is there a way to get the list of fields on a record using an expression?

Certified Lead Developer

Is there a way to get the list of fields on a record using an expression? See example below on potential usage.

a!forEach(
  items: 'recordType!{SYSTEM_RECORD_TYPE_USER}User'.fields,
  expression: fv!item
)

If this is not currently supported it would be a great addition that would open up many interesting use cases.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • This is expected behavior - record data types behave more similarly to maps in that it's possible that some keys are not present in the data type. This is beneficial for operations like using the Write Records node since we are able to only write fields that are present (and ignore other fields).

    However, if you need to get all the fields the approach I have typically taken is to just query a single row of data and use that to get the relevant fields. Just curious, how do you plan to use the list of fields in your app?

  • 0
    Certified Lead Developer
    in reply to Peter Lewis

    I created a very dynamic component that takes any data structure and renders it to screen.

    This is mostly meant to just get started quickly. But it can also be customized to death and be used as a replacement for a hand-crafted UI.

    And it would be great if a!keys would return all fields, or at least has a parameter to make it do it.