Show results of an expression rule on Tempo?

Certified Associate Developer

I have built and tested my first expression rule. I heard from a colleague that there is a simple way of displaying that as record, so I tried creating a new record object. My problem is now that I can only choose between data store entity, process model or expression. Am I barking the wrong tree?

My goal is to display filtered data on tempo in the simplest possible way, without using a process at all.

  Discussion posts and replies are publicly visible

  • Hi Florian

    Could you elaborate a bit further on your use case? What is the source of the data that you want filtered and then displayed?

  • Yes, a little more information would help. But you're in the right place for creating a record. You have to choose the source of the data for a record, and if you don't have a process -- it's likely that you'll want "Data Store Entity," which means that you're querying the data from a database. Is that the case? If so, you should first import the table structure through a CDT (and create a data store and data store entity at the same time). 

    Our free trial (https://www.appian.com/platform/free-trial/) includes a records tutorial you can follow along with to build a record. Or, you can watch our course on records design at academy.appian.com. 

  • 0
    Certified Associate Developer
    in reply to Stewart Burchell

    I have the following expression rule and I would like exactly the output which shows in the preview of the rule shown under records (or if that is not possible somewhere else on the Tempo page).

    a!queryEntity(
      entity: cons!myENTITY,
      query: a!query(
        selection:a!querySelection(
          columns:{
            a!queryColumn(field:"id"),
            a!queryColumn(field:"amount"),
            a!queryColumn(field:"currency"),
          }
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: 3,
          sort:a!sortInfo(
            field:"amount",
            ascending: false()
          )
        )
      ),
      fetchTotalCount: false
    ).data
    

    My hope is that it does not depend on whether the entity comes from an Appian DB or from an external DB (ideally the latter).

  • 0
    Certified Associate Developer
    in reply to kara.peeler

    I entered details in the reply to the previous post. My question is more architectural than technical and I did not find that answer in the tutorials (yet).

    My ultimate goal is to display only a subset of the respective source database Table somewhere on the Tempo page. I could of course build a new DB-View on the DB itself, but I was thinking that is architecturally cleverer to do it on Appian side as expression rule. I will need exactly the same subset later in my progress, that's why an expression rule looks like the correct approach to me.

    What I am after is a way to preview my expression rule on the tempo page without using a process or interface. Is that possible at all?

  • Hi Florian

    So: since you have a connection to the datasource you could implement a Record Type using the 'Entity-backed' model (that would be the most direct approach to exposing your datasource as a set of Records in Tempo):

    You can thine configure the 'list view'  of Records to just show the 3 columns that you've defined in your query entity (i.e. hide the other columns by explicitly not selecting them for display in the list). I'm sure there's a good reason for your batchSize being set to 3 but we'd have to find another way of expressing that logic so as to only display 3 out of however many records there actually are.

    However: if your question is explicitly about how can I use the expression you've already defined to expose the results as records, then you could configure your Record type to use the 'Expressio-backed' model:

    Then you can use your expression (modified to return a Datasubset). The documentation/tutorials should help you achieve this.