Skip to main content
August 7, 2021
Question

Populate a column based on a query filter

  • August 7, 2021
  • 7 replies
  • 0 views

Hi,

New to Appian!

I have a query filter rule:

a!queryEntity(
  entity: cons!PINBuddy_DSE_Wizard,
  query: a!query(
    logicalExpression: a!queryLogicalExpression(
      operator: "AND",
      filters: {
        a!queryFilter(
          field: "particpaitUpdateCutOffDate",
          operator: "<=",
          value: today()
        ),
        a!queryFilter(
          field: "paymentMethod",
          operator: "<>",
          value: null
        ),

      },
      ignoreFiltersWithEmptyValues: true
    ),
    pagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: -1
    )
  ),
  fetchTotalCount: true
).data

Based on these filters, a list of records get generated, how do i write to a specific column, say "particpantNoteExtracted" to these records?

Hope my question is clear.

Thanks in advance

Neil

    7 replies

    stefanhelzle0001
    Brainy
    August 7, 2021

    QueryEntity works like a SQL-Select. To write to DB you would use a Write To Datastore Node in a process model.

    When starting with Appian, did you try the tutorials?

    docs.appian.com/.../Tutorials.html

    aparajitas0001
    August 9, 2021

    Hey, If you need to write to the database, you would have to use Write to Datastore entity node in process model or function in saveInto on interface. You would also have to write the whole row otherwise the other columns would get nullified, so plase do not use selection while writing to DB.

    neill0004Author
    August 9, 2021

    How do i write to multiple records? Right now if i use the saveInto, it only writes to one row and same with the process model route. Thanks for the help

    aparajitas0001
    August 9, 2021

    Is your rule input multiple type? If it is you can write multiple rows to the table.