does a record need any configuration in order to use a pickerFieldRecords() ?

I have the following code in order to add a search field on my interface

a!pickerFieldRecords(
label: "Description",
placeholder: "Start typing a description",
recordType: cons!XCS_RECORD_TYPE_CERTIFICATION_TYPE,
saveInto: ri!certificationId,
value: ri!certificationId
)

 

Is there anything especial I need to add to my record in order to make this work. I referred to this example but not sure what else I need.

https://docs.appian.com/suite/help/18.3/Record_Picker_Component.html

Note that I'm using a grid as my record List and not an expression as mentioned in that example.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I don't think you need anything additional here.

    I would just be careful with how you're using saveInto and value here. Make sure that the rule input "certificationId" is both an array and is of the type XCS_RECORD_TYPE_CERTIFICATION_TYPE. If your rule input is an number (integer) or something else, this will break what you currently have. 

     

     

    Working code snippet using record type "User" below. My ri!users is of type "User" and is an array.

    a!pickerFieldRecords(
      label: "Users",
      placeholder: "Pick a User",
      recordType: cons!JXI_USER_RECORD,
      saveInto: ri!users,
      value: ri!users
    )

Reply
  • 0
    Certified Lead Developer

    I don't think you need anything additional here.

    I would just be careful with how you're using saveInto and value here. Make sure that the rule input "certificationId" is both an array and is of the type XCS_RECORD_TYPE_CERTIFICATION_TYPE. If your rule input is an number (integer) or something else, this will break what you currently have. 

     

     

    Working code snippet using record type "User" below. My ri!users is of type "User" and is an array.

    a!pickerFieldRecords(
      label: "Users",
      placeholder: "Pick a User",
      recordType: cons!JXI_USER_RECORD,
      saveInto: ri!users,
      value: ri!users
    )

Children