JS for checking if user in people picker or user is author
- This topic has 1 reply, 2 voices, and was last updated 6 years, 5 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › JS for checking if user in people picker or user is author
Hi,
I see the 2 functions below in spjs.dffs. Can these be used in our JS code, or are these back-end only?
I have tried to use, but they are not working as I expect.
spjs.dffs.isUserAuthor()
spjs.dffs.isUserInPicker()
Is there a certain syntax for each if these can be used in our JS to check for a user role? Or do we have to use the DFFS rules for these? All of our logic is JS, so preferably, we’d like these user checks within our JS as well.
Thanks in advance!
Hi,
The “spjs.dffs.isUserAuthor” function is intended for internal use, but you can use the spjs.dffs.isUserInPicker function like this:
var isInPicker = spjs.dffs.isUserInPicker("NameOfPeoplePicker", "Eq");
Alexander