Expression rule for multiple table

Hi,

can we write single expression rule to get data from multiple table, if it's possible how it can be simple example

like: select orders.orderid, customers.custername from order inner join customers on orders.customerid=customer.customerid

can we write such query in expression rule 

Thanks,

Kavya 

  Discussion posts and replies are publicly visible

Parents
  • In your conceptual model you need to separate the data model aspect from the data retrieval aspect. Expressions can retrieve data from a "data model" but not (easily) implement such a model.

    In your example you have two choices:

    1. create two different Record Types, one for Order and one for Customer, and then have Orders nested as a multiple under Customer. You can then use a!queryRecordType() to retrieve the data
    2. create a database VIEW which joins the data as you describe, then create a CDT from the VIEW and then an expression that contains a a!queryEntity() that retrieves data from that VIEW

    Note that 1., is essentially Appian's way of effectively implementing 2. without having to resort to creating database VIEWs.

Reply
  • In your conceptual model you need to separate the data model aspect from the data retrieval aspect. Expressions can retrieve data from a "data model" but not (easily) implement such a model.

    In your example you have two choices:

    1. create two different Record Types, one for Order and one for Customer, and then have Orders nested as a multiple under Customer. You can then use a!queryRecordType() to retrieve the data
    2. create a database VIEW which joins the data as you describe, then create a CDT from the VIEW and then an expression that contains a a!queryEntity() that retrieves data from that VIEW

    Note that 1., is essentially Appian's way of effectively implementing 2. without having to resort to creating database VIEWs.

Children
No Data