Working with records

Hey gang:

 

I'm creating a customer look-up interface. I'm essentially querying the entity-backed records to determine if a customer exists in the database. It has two parts, the first component is the record picker. The second component is just a read-only field that displays selected fields from the record. This is what I have:

 

load(
  local!storedRecord,
  a!formLayout(
  label: "Customer Look-up",
  firstColumnContents: {
    a!pickerFieldRecords(
      label: "Customer Name",
      labelPosition: "ABOVE",
      instructions: "Type the name of the customer",
      maxselections: 1,
      recordtype: cons!FSRC_CUST_REC_PICKER,
      value: local!storedRecord,
      saveInto: local!storedRecord,
      validations: {}
    ),
    a!textField(
      label: "Selected Customer",
      labelPosition: "ABOVE",
      value: if(
        isnull(local!storedRecord),
        "",
        rule!FSRC_queryCustomerRecord()
      ),
      saveInto: local!storedRecord,
      refreshAfter: "UNFOCUS",
      validations: {}
    )
  }

 

rule!FSRC_queryCustomerRecord:

 =queryrecord(
      cons!FSRC_CUST_REC_PICKER,
      a!query(
        filter: a!queryFilter(
          field: "customerID",
          operator: "includes",
          value: local!storedRecord
        ),
        selection:a!querySelection(
          columns:{
            a!queryColumn(
              field:"firstName"
            ),
            a!queryColumn(
              field:"lastName"
            ),
            a!queryColumn(
              field:"custAddress"
            ),
            a!queryColumn(
              field:"customerID"
            )
          }
        ),
        pagingInfo: a!pagingInfo(
          startIndex:1,
          batchSize:-1
        )
      )
    )

 

This, however, produces the error:

Could not display interface. Please check definition and inputs.

Interface Definition: Expression evaluation error in rule 'fsrc_querycustomerrecord' at function 'queryrecord': Error evaluating function 'queryrecord' : Cannot apply operator [INCLUDES] to field [customerID] when comparing to value [TypedValue[it=197,v={TypedValue[it=1,v=2]}]].

 
I'm sure it has something to do with incompatible data types, I'm just not sure how to deal with it. Any help would be appreciated. Thanks in advance.
 
 

  Discussion posts and replies are publicly visible