Hi, we are using the user picker and put in a groupFilter to a specific group.

Hi, we are using the user picker and put in a groupFilter to a specific group.

a!pickerFieldUsers(
label: "Author",
instructions: "Start typing any letters of the Author's name and select from picklist that will appear. As more letters are typed, the picklist will narrow down",
maxSelections:1,
groupFilter: cons!BMD_BaselineAuthorGroup,
value: ri!selectedDocument.documentAuthor,
saveInto: ri!selectedDocument.documentAuthor
),

The problem is if that particular user gets removed from the group. When we try to go back to that form, it gives us the following error:

Expression evaluation error in rule 'bmd_marketbaselinedocumentdetails'.
A user picker component [label="Author"] has an invalid value for "value". All users must be valid and visible to the viewer.

What would be the best way around this?
...

OriginalPostID-116553

OriginalPostID-116553

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Perhaps replace the value() line with the code below; I would suggest refining your logic with respect to what happens to the values passed into the SAIL form and how the "go back" works, but that depends too much on your specific requirements...

    value: if(
    isusermemberofgroup(ri!selectedDocument.documentAuthor, cons!BMD_BaselineAuthorGroup),
    ri!selectedDocument.documentAuthor,
    null()
    )

    (note that this may utilize the peopleFunctions plug-in, I don't remember clearly)
Reply
  • 0
    Certified Lead Developer
    Perhaps replace the value() line with the code below; I would suggest refining your logic with respect to what happens to the values passed into the SAIL form and how the "go back" works, but that depends too much on your specific requirements...

    value: if(
    isusermemberofgroup(ri!selectedDocument.documentAuthor, cons!BMD_BaselineAuthorGroup),
    ri!selectedDocument.documentAuthor,
    null()
    )

    (note that this may utilize the peopleFunctions plug-in, I don't remember clearly)
Children
No Data