Skip to main content
March 19, 2025
Question

Record Picker Issue

  • March 19, 2025
  • 7 replies
  • 0 views

I'm trying to implement a record picker in a form.  But I'm facing issues getting it behave the way I would prefer.

Currently I have an interface for the form and this is tied to a process model that uses the interface as a start form and takes the input from the form and calls a Write Record Smart service. 

This all works as expected.

On the interface I have a rule import: ri!workflowTemplateId that holds the selected values of the RecordPicker. 

In the processModel I have processVariable : pv!workflowTemplateId that this is passed into.  My current issue is that when the form is loaded this value is coming in as "0" (I believe) so the RecordPicker field is pre selected but with an object "[Not Available]" because I obviously don't have an object with an ID of 0.  I would like the RecordPicker field to be empty when entering the form but I cannot seem to get it to be empty.  I have tried with this field as both an Integer field and as a List.  How can I create initiate the form with no Record Preselected in the Workflow Template field?

/resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/Screenshot-2025_2D00_03_2D00_19-at-2.13.07_2F20_PM.png

RecordPicker code:

a!pickerFieldRecords(
      label: "Workflow Template",
      labelPosition: "ADJACENT",
      instructions: "",
      helpTooltip: "Select a valid template workflow to use for this event.",
      placeholder: "Select Template Workflow to Initiate",
      maxSelections: 1,
      recordType: 'recordType!{bb035f50-d14a-4303-9c20-48d3e48deab0}WPA1 Workflow Template',
      value: ri!workflowTemplateId,
      saveInto: ri!workflowTemplateId,
      required: true,
      openLinksIn: "NEW_TAB",
      validations: {}
    )

Start Form config:

/resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/Screenshot-2025_2D00_03_2D00_19-at-2.16.25_2F20_PM.png

ProcessVariables:

/resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/3716.Screenshot-2025_2D00_03_2D00_19-at-2.18.15_2F20_PM.png

    7 replies

    stefanhelzle0001
    March 19, 2025
    value is coming in as "0" (I believe) so the Rec

    Please validate this. Add a field to your form that just shows this value.

    Do you plan to select multiple templates? If no, do not make it a multiple.

    March 19, 2025

    So I confirmed that it's being set to 0 when entering the form:

    In the ProcessModel, it appears that the value for that processVariable is being defaulted to "0".  If I remove the value like the other ones, when I save it automatically changes back to 0.

    /resized-image/__size/640x480/__key/communityserver-discussions-components-files/62/Screenshot-2025_2D00_03_2D00_19-at-3.37.25_2F20_PM.png

    March 19, 2025

    So I tried setting the value =null() but that did not work either.  In the end I changed the type of the variable to Text everywhere and it is working as expected now.  I'm not using that value at the moment but I may need to convert to Integer when I do end up using it.