Hello, I am trying to create a pickerFieldCustom. I was able to make

Hello,

I am trying to create a pickerFieldCustom. I was able to make one that works when selecting a single result, but what is the best practice or implementation of selecting multiple results?

Thanks....

OriginalPostID-114655

OriginalPostID-114655

  Discussion posts and replies are publicly visible

Parents
  • Ignore all the previous code. What I have now is pasted below. It will select one item but then it returns an error related to selectedLabel and value not being the same length:

    = a!pickerFieldCustom(
    label: ri!label,
    instructions: ri!instructions,
    required: ri!required,
    requiredMessage: ri!requiredMessage,
    readOnly: ri!readOnly,
    disabled: ri!disabled,
    maxSelections: if(
    isnull(
    ri!maxSelections
    ),
    1,
    ri!maxSelections
    ),
    suggestFunction: rule!RULE_getEmployeeForPicker(
    _,
    if(
    rule!APN_isBlank(
    ri!numResultsReturned
    ),
    20,
    ri!numResultsReturned
    )
    ),
    selectedLabels: if(

    rule!APN_isBlank(
    ri!value
    ),
    null,
    apply(rule!RULE_multipleEmployeeLabelForPicker(identifier: _, labels: rule!Q_getEmployeeForPickerByID(
    ri!value
    ).Name_Email_Division, identifiers: rule!Q_getEmployeeForPickerByID(
    ri!value
    ).UserID), ri!value
    )
    ),
    value: ri!value,
    saveInto: {ri!value,
    ri!saveValueInto
    },
    refreshAfter: "KEYPRESS"
    )
Reply
  • Ignore all the previous code. What I have now is pasted below. It will select one item but then it returns an error related to selectedLabel and value not being the same length:

    = a!pickerFieldCustom(
    label: ri!label,
    instructions: ri!instructions,
    required: ri!required,
    requiredMessage: ri!requiredMessage,
    readOnly: ri!readOnly,
    disabled: ri!disabled,
    maxSelections: if(
    isnull(
    ri!maxSelections
    ),
    1,
    ri!maxSelections
    ),
    suggestFunction: rule!RULE_getEmployeeForPicker(
    _,
    if(
    rule!APN_isBlank(
    ri!numResultsReturned
    ),
    20,
    ri!numResultsReturned
    )
    ),
    selectedLabels: if(

    rule!APN_isBlank(
    ri!value
    ),
    null,
    apply(rule!RULE_multipleEmployeeLabelForPicker(identifier: _, labels: rule!Q_getEmployeeForPickerByID(
    ri!value
    ).Name_Email_Division, identifiers: rule!Q_getEmployeeForPickerByID(
    ri!value
    ).UserID), ri!value
    )
    ),
    value: ri!value,
    saveInto: {ri!value,
    ri!saveValueInto
    },
    refreshAfter: "KEYPRESS"
    )
Children
No Data