Expression Rule for iterating through Documents

Appian Community Team,

I need to have an Expression Rule that does the below:

Takes 2 Rule Inputs:

1. reviewID (Number data type)

2. file (Document Data type, this is Array holding list of documents)

I need to write an Expression rule that iterates through the Rule Input file and then outputs a list of Record Data ReviewDocument, this ReviewDocument record will have data points from both Rule Input reviewID and File.

Can you please advise on sample code for this.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    What exactly do you want to do with these documents? Can you describe how the output of that expression should look like?

  • Hi  ,

    I have a Table(Record) called REVIEW_DOCUMENTS in the Database. This Table has below data points:

    REVIEW_ID

    DOCUMENT_ID

    DOCUMENT_NAME

    I want to populate above Record with Review ID and Documents information using an Expression Rule, we can expect to have multiple Documents for a given Review ID. Then eventually in the process model I want to write that Records output into a Database Table REVIEW_DOCUMENTS so that I can show the documents to users in Summary screens.

    To your question on what I was expecting the Expression Rule to output, I want that to display list of ReviewDocuments Records with Review Id, Doc Id and Doc Name data points in each.

    Please let me know if you are having any questions. I am open for suggestions if I am not thinking correctly here.

    Regards,

    Mahesh

Reply
  • Hi  ,

    I have a Table(Record) called REVIEW_DOCUMENTS in the Database. This Table has below data points:

    REVIEW_ID

    DOCUMENT_ID

    DOCUMENT_NAME

    I want to populate above Record with Review ID and Documents information using an Expression Rule, we can expect to have multiple Documents for a given Review ID. Then eventually in the process model I want to write that Records output into a Database Table REVIEW_DOCUMENTS so that I can show the documents to users in Summary screens.

    To your question on what I was expecting the Expression Rule to output, I want that to display list of ReviewDocuments Records with Review Id, Doc Id and Doc Name data points in each.

    Please let me know if you are having any questions. I am open for suggestions if I am not thinking correctly here.

    Regards,

    Mahesh

Children