Is there a way to get the list of fields on a record using an expression? See example below on potential usage.
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
There is a plugin providing this functionality.
Which use cases are you thinking about? Fully dynamic interfaces?
Thanks for the response. Yes, I am familiar with that plugin. I would however like to make use of the latest record features instead if possible, i.e. custom fields and relationships on synced records. Yes, we have a use case that would benefit from accessing the record fields dynamically.
I don't believe it is currently possible but thought I would put the question out there in any case. I do have a workaround although not ideal, i.e. create an expression rule that returns a list of record type field references explicitly. For example.
OK. Got it. Why not just cast the record type to its CDT type?
There is a ugly hack from the old days using toxml and xpath to extract the field names. Did not test this with a record type.
Philip can you provide more context on how you plan to use these dynamically created fields? We're actively looking at ways to improve using / referencing record fields, but understanding how you plan to use them can help us prioritize accordingly. Thanks!
Kudos for trying mate, but this will get all the values for the 'nombre' field for all areas, what OP asked is how to get the fields themselves not the values
While it does get the fields; it only does so if they are filled with dataunlike the CDTs
Yanal if you provide value for all the fields (as shown as following) you will get all the field names.
a!keys( recortType!RDW_REC_Comment(RDW_REC_Comment.id: 1, RDW_REC_Comment.user_r: "test", .... )
a!keys() - takes record as input not the recordType.
Returns the keys of the provided map, dictionary, CDT, or record.
value (Any Type): The map, dictionary, CDT, or record whose keys should be returned.
-While it does get the fields; it only does so if they are filled with data-unlike the CDTsThat's what I said mate, the trick is on how to get the fields names without them having a value, like in the CDTs case.
© 2023 Appian. All rights reserved.