Introduction to Expressions - Working with Record Data - Hands-On Practice - Step 2

As far as I can tell, I have followed the instructions to the letter. But my results are not the data from the Vehicle record. In fact, when I went and looked at "W0420AA_QR_getVehicle" and tested the inputs, I found that the result is always an ID or an array of IDs, never the record data.

What did I miss? What am I doing wrong?

Expression Practice

  Discussion posts and replies are publicly visible

Parents
  • Hi  !

    Thank you for bringing this to our attention. You are not doing anything wrong! Looks like we have some updates to make in the course - so we will get right on that. In a previous version of Appian, if you did not specify any fields when querying a record, it would return all fields, even if you did not need all of them. Now, you must specify the fields that you are looking for in the expression. If you write the AA_QR_getVehicle() expression in the left pane, you will be able to see its properties in the description pane below it. You will notice the other parameters that you could use to help return the exact data that you are looking for. In the fieldsAndRelationships parameter, you can add the record fields that you are looking to return. Or, if you want to return all fields from that record, you can use a!selectionFields() as shown below. These are concepts and topics that you will learn in more detail as you progress through the learning path.

    Hope this helps!

    rule!AA_QR_getVehicle(
       fieldsAndRelationships:
          a!selectionFields(
            allFieldsFromRecordType: recordType!AA Vehicle
        ),
       vehicleId: 1
    )

Reply
  • Hi  !

    Thank you for bringing this to our attention. You are not doing anything wrong! Looks like we have some updates to make in the course - so we will get right on that. In a previous version of Appian, if you did not specify any fields when querying a record, it would return all fields, even if you did not need all of them. Now, you must specify the fields that you are looking for in the expression. If you write the AA_QR_getVehicle() expression in the left pane, you will be able to see its properties in the description pane below it. You will notice the other parameters that you could use to help return the exact data that you are looking for. In the fieldsAndRelationships parameter, you can add the record fields that you are looking to return. Or, if you want to return all fields from that record, you can use a!selectionFields() as shown below. These are concepts and topics that you will learn in more detail as you progress through the learning path.

    Hope this helps!

    rule!AA_QR_getVehicle(
       fieldsAndRelationships:
          a!selectionFields(
            allFieldsFromRecordType: recordType!AA Vehicle
        ),
       vehicleId: 1
    )

Children
No Data