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
There is a plugin providing this functionality.
https://community.appian.com/b/appmarket/posts/cdt-manipulation
Which use cases are you thinking about? Fully dynamic interfaces?
Hi Stefan,
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.
{ 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{firstName}firstName', 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{lastName}lastName' }
Kind Regards,
Philip Snyman
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!