Bean Array Accessor Functions

Overview

Get a property value for a single object or a list of objects in a single function, which is very useful when generating display information for dropdown lists or grid columns on task forms.  

Key Features & Functionality

  • Functions mirror the default bean accessors but add support for accessing properties of multiple Appian objects at once (user()->users(), group()->groups(), etc)
  • Support both single value and multi value inputs and can be used in place of the standard accessor functions
  • The application .zip file provided with download contains an application with several expression rules that can be used to test the capabilities
Anonymous
Parents
  • Hi,,

    I am using documents function to get expiry date for list of documents, this function returns expiry date for documents where Appian native function document() is not returning any expirydate.

    Which function returning correct result?



    My sample code:
    {
    JustExpiryDate: documents(getdocumentsfromfolder(1854013,true()),"expirationDate"),
    BeanDocumentsplugIn:a!forEach(
    items: merge(
    documents(getdocumentsfromfolder(1854013,true()),"id"),
    documents(getdocumentsfromfolder(1854013,true()),"dateCreated"),
    documents(getdocumentsfromfolder(1854013,true()),"expirationDate")
    ),
    expression: a!map(
    id:fv!item[1],
    dateCreated:fv!item[2],
    expireDate:fv!item[3]
    )
    ),
    NativeDocumentFunction:a!forEach(
    items: getdocumentsfromfolder(1854013,true()),
    expression: a!map(
    id:document(fv!item,"id"),
    dateCreated:document(fv!item,"dateCreated"),
    expireDate:document(fv!item,"expirationDate")
    )
    )
    }

Comment
  • Hi,,

    I am using documents function to get expiry date for list of documents, this function returns expiry date for documents where Appian native function document() is not returning any expirydate.

    Which function returning correct result?



    My sample code:
    {
    JustExpiryDate: documents(getdocumentsfromfolder(1854013,true()),"expirationDate"),
    BeanDocumentsplugIn:a!forEach(
    items: merge(
    documents(getdocumentsfromfolder(1854013,true()),"id"),
    documents(getdocumentsfromfolder(1854013,true()),"dateCreated"),
    documents(getdocumentsfromfolder(1854013,true()),"expirationDate")
    ),
    expression: a!map(
    id:fv!item[1],
    dateCreated:fv!item[2],
    expireDate:fv!item[3]
    )
    ),
    NativeDocumentFunction:a!forEach(
    items: getdocumentsfromfolder(1854013,true()),
    expression: a!map(
    id:document(fv!item,"id"),
    dateCreated:document(fv!item,"dateCreated"),
    expireDate:document(fv!item,"expirationDate")
    )
    )
    }

Children
No Data