Can I create a Picker of Process Models?

Certified Senior Developer

Is it possible to add a Picker to a form that selects from Process Models? (Like you see in the interface designer).

  Discussion posts and replies are publicly visible

Parents
  • You can try custom picker. Following is SAIL recepie code for custom picker that I modified to update for process models (Appian version 16.3):

    =load(
    local!pickedprocessModels: {},
    local!processModelLabels: index(getprocessmodelsbyfolder(32,a!pagingInfo(startIndex:1,batchSize:4 )),"name"),
    local!processModelAbbreviations: index(getprocessmodelsbyfolder(32,a!pagingInfo(startIndex:1,batchSize:4 )),"id"),
    a!formLayout(
    firstColumnContents: {
    a!pickerFieldCustom(
    label: "Process Models",

    maxSelections: 3,
    suggestFunction: rule!test_filterRule(filter: _, labels: local!processModelLabels, identifiers: local!processModelAbbreviations),
    selectedLabels: if(
    count(local!pickedprocessModels) = 0,
    null,
    apply(
    rule!test_FilterDisplayRule(identifier: _, labels: local!processModelLabels, identifiers: local!processModelAbbreviations),
    local!pickedprocessModels
    )
    ),
    value: local!pickedprocessModels,
    saveInto: local!pickedprocessModels
    ),
    a!textField(
    label: "Selected Data",
    value: toprocessmodel(local!pickedprocessModels),
    readOnly: true
    )
    }
    )
    )

    Note: getprocessmodelsbyfolder is a custom function which returns all the details of process models in a folder. You can use constants of type process model and text with uuids instead but then you'll have dependency on the models.
Reply
  • You can try custom picker. Following is SAIL recepie code for custom picker that I modified to update for process models (Appian version 16.3):

    =load(
    local!pickedprocessModels: {},
    local!processModelLabels: index(getprocessmodelsbyfolder(32,a!pagingInfo(startIndex:1,batchSize:4 )),"name"),
    local!processModelAbbreviations: index(getprocessmodelsbyfolder(32,a!pagingInfo(startIndex:1,batchSize:4 )),"id"),
    a!formLayout(
    firstColumnContents: {
    a!pickerFieldCustom(
    label: "Process Models",

    maxSelections: 3,
    suggestFunction: rule!test_filterRule(filter: _, labels: local!processModelLabels, identifiers: local!processModelAbbreviations),
    selectedLabels: if(
    count(local!pickedprocessModels) = 0,
    null,
    apply(
    rule!test_FilterDisplayRule(identifier: _, labels: local!processModelLabels, identifiers: local!processModelAbbreviations),
    local!pickedprocessModels
    )
    ),
    value: local!pickedprocessModels,
    saveInto: local!pickedprocessModels
    ),
    a!textField(
    label: "Selected Data",
    value: toprocessmodel(local!pickedprocessModels),
    readOnly: true
    )
    }
    )
    )

    Note: getprocessmodelsbyfolder is a custom function which returns all the details of process models in a folder. You can use constants of type process model and text with uuids instead but then you'll have dependency on the models.
Children