Not applicable

people picker default value not working

Sharepoint: 2010

Nntex Forms: 1.5.2

I discovered that in NF 1.5.2 we now have the capability to set a default value on a people picker field, which is great if it saves the hacking around with JavaScript that was previously required.

However, I tried this for the first time today and it's not working. I have a document library with a "Submitted By" people field, and a Nintex edit form to edit the doc properties with the corresponding field control set to-

But on uploading a document the field stays empty (null).

Question-

I posted another question because I found that Forms: "new mode" doesn't work for Document Libraries?‌  Could this be caused by the same problem?

I.e. the Sharepoint 2-stage upload process for documents means the Submitted By field has already been set to (empty) by the time the property edit form is opened, so the default value on a field will not be used?

Or maybe the default value on a people picker needs to be not the simple value Current User but one of those lovely, bizarre, Sharepoint "settings strings" like "-1;#Current User;" ?    As usual the Nintex documentation is not a lot of help.

Regards: colin_e

Reply
6 Replies
eharris04
Collaborator

Re: people picker default value not working

Have you tried using Created By instead of Current User.. Technically they would both be the same person, but that might solve your issue. At least it worked when I created a new form on a document library and set the column to created by. 

0 Kudos
Reply
Not applicable

Re: people picker default value not working

Thanks. Tried that, still no luck.

I have the visibility on this field set to be conditional (based on a field value) to hide it when the list item is first being created, and similarly it is set to be disabled. However I have tried turning both these features off, so the field is permanently visible and enabled, and the value stays resolutely blank. Using either Current User or Created By makes no difference.

Looks like i'll have to log this as a bug. I think our corporate IT guys (and probably Nintex) are getting tired of me logging bugs on NF :-}

Reagrds: colin_e

0 Kudos
Reply
eharris04
Collaborator

Re: people picker default value not working

Colin,

Sorry to hear that, but some things do happen.  What version on Nintex are you running, and what version of SP?  I'm on travel but will keep this in the back of my mind to look into.

Eric

0 Kudos
Reply
Not applicable

Re: people picker default value not working

Cheers Eric

per my original question we are running-

Sharepoint: 2010

Nintex Forms: 1.5.2

I have since tried this feature (People Picker defaul;t value) on a List edit form and it works correctly, so as per my original message I am suspicious that this is something to do with the weird (to be charitable let's call it "idiosyncratic") way SP does creating a file by uploading to a library as a 2-stage process.

If the Nintex field logic is looking for a null value in a field to trigger the behaviour of using the default value, then I believe the first (Upload) step could set the field to a non-null value, meaning the second stage form never gets to use the default.

As a point of comparison, when a List Create form is running, the list item ID is null (because the list item hasn't been created yet), but when the Document "Set properties" form is running (immediately after uploading the file) the document ID does exist, so I suspect the same applies to other fields. if Nintex are using null field values to drive their form logic it will not work consistely between lists and doc libraries.

Regards: colin_e

0 Kudos
Reply
eharris04
Collaborator

Re: people picker default value not working

Collin,

Any luck with this?  Also do you have Nintex Workflows?

0 Kudos
Reply
Not applicable

Re: people picker default value not working

Hi,

     Yes we do have Nintex Workflow. I have a solution that works from the users perspective now, but under the covers what it is doing is rather a kludge.

What I wanted was a field called "Submitter" that is shown to the user when the List item is being created, is set to the current user's name, and cannot be changed (The Submitter is always [Me]). In terms of the semantics of Nintex Forms this is more like a calculated field, but I don't think you can have a calculated field of type "Person or Group".

What I have now is a fudge-

  1. The Form field is set to default to "Current User" (this part is working now, I think the earlier problem was to do with the SP "lifecycle" issues I referred to earlier). However the field is Disabled, so it can't actually set the field value when the form is submitted, so the value being shown to the user is just a visual hint.
  2. After the item is created a workflow picks it up and sets the Submitter field  = "Created By".

This works, as long as nobody looks at the item before the workflow batch cycle has run and the field has been updated.

That last point hints at the nasty timing issues and race conditions that I have found lie in wait for you when building workflows like this that are more like scripts, and there are some extra complexities when dealing with Document Libraries that I had not found documented anywhere, so I've had to work out by trial and error (and a lot of reading Nintex workflow logfile entries).

0 Kudos
Reply