Hello I need help with the format of final result:
{ a!localVariables( local!data: a!queryRecordType( recordType: 'recordType!{4e239f9b-3c32-4a2d-9080-0a76750fe5eb}BWP Clients', fields: {'recordType!{4e239f9b-3c32-4a2d-9080-0a76750fe5eb}BWP Clients.fields.{f759f435-fee5-4c98-8bd8-dc9c00f703a5}companyName'}, pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 100) ).data., local!resut: a!forEach( items: local!data, expression: fv!item ), local!resut ) }
The result of this execution is:
List of BWP Clients - 45 items
What I need as result of this is just a simple list with company Names
comanyName: "Company1"
companyName "Space"
any help will be appreciated.
Discussion posts and replies are publicly visible
You will want to utilize the property() function in your a!forEach, to return only the companyName field. Such as below (update on line 11):
{ a!localVariables( local!data: a!queryRecordType( recordType: 'recordType!{4e239f9b-3c32-4a2d-9080-0a76750fe5eb}', fields: {'recordType!{4e239f9b-3c32-4a2d-9080-0a76750fe5eb}.fields.{f759f435-fee5-4c98-8bd8-dc9c00f703a5}'}, pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 100) ).data., local!resut: a!forEach( items: local!data, expression: property(fv!item,"companyName",null) ), local!resut ) }
Hello Chris, I have tried similar approach but the returned result is the null value, for all results.