People Picker Column doesn't recognize it has been supplied with value

Forums Dynamic Forms for SharePoint People Picker Column doesn't recognize it has been supplied with value

Viewing 17 reply threads
  • Author
    Posts
    • #13976
      Bryan Waldrop
      Participant

      I have a people picker column that is made required by a rule in the edit form. However, “You must specify a value for this required field.” displays on save as if no value has been provided even when a name resolved through the people picker has been selected. Any ideas?

    • #13978
      Bryan Waldrop
      Participant

      All the other columns in this section that are made required by the same rule are behaving fine.

      Attachments:
    • #13981
      Bryan Waldrop
      Participant

      Here is the rule I am using to make these columns required.

      Attachments:
    • #13984
      Alexander Bautz
      Keymaster

      Hi,
      Which version of DFFS and SPJS-Utility are you using? – hover over the “Enhanced with DFFS” and click the “License and version information”.

      Alexander

      • #13998
        Bryan Waldrop
        Participant

        Dynamic Forms for SharePoint DFFS Backend v4.4.1.2|CSS version: 4.16 / 4.16|spjs-utility version: 1.267

    • #14000
      AdamP
      Participant

      I’m seeing the same error, but on multiline text fields (rich text), I haven’t yet tried on a people picker.
      The fields are populated, but on save they all show in red text “You must specify a value for this required field”.
      Oddly – this only occurs on a laptop with a different build to my desktop machine (both IE 11, but slightly different versions). I’m also getting frequent popups stating “An add-on for this website failed to run” – as yet I can’t determine what isn’t running.

      DFFS Frontend 4.4.1
      DFFS Frontend CSS 4.19/4.19
      Autocomplete 1.4.7
      Cascading Dropdowns 3.528
      jQuery 1.12.4
      Lookup 1.1.5
      Resource Management not loaded
      SPJS-Utility 1.267
      vLookup frontend v2.2.76

      Anything to look for to track down the problem?

      Adam

    • #14021
      Alexander Bautz
      Keymaster

      Hi Bryan,
      I need to see the version information from your frontend – hover over the “Enhanced with DFFS” below your form.

      Are you encountering this error when setting the people picker value manually, or do you have some custom code that sets it on save?

      Could you try adding this code to the console (hit F12 > Console) when you see the error message:

      var test = getFieldValue("NAME OF YOUR FIELD");
      console.log(test);
      console.log(typeof test);

      Post the output here.

      Adam
      try the same console code and post the output.

      Alexander

    • #14027
      AdamP
      Participant

      On the problematic machine I get an empty value for console.log(test); both when the form loads and the fields are empty, and after trying to save with values in the fields. Other fields correctly return the value entered in the field (and typeof=string)

      
      
      undefined
      
      string

      On the machine without the issue, doing the same test on the empty form returns;

      
      
      undefined
      <DIV></DIV>
      string

      (Also the same if I leave the field empty and try to save).

      Is there anything else that would be useful to look at?

      • #14046
        Alexander Bautz
        Keymaster

        Which browser version are you using on the machine with the problem? – do you see the multiline field correctly in this browser (same layout as on the machine that works)?

        Do other multiline fields work as expected or are all multiline fields failing?

        Alexander

      • #14085
        AdamP
        Participant

        Hi Alexander

        Problematic- IE version: 11.306.10586.0 Update versions: 11.0.31
        Normal- IE version: 11.0.9600.18500CO Update versions: 11.0.36

        All multiline text fields where “required” has been set by a DFFS rule seem to be failing (here and on other forms)

        The fields themselves look completely normal. I did a text difference comparison on the page source html – completely identical except for a value for id=”__REQUESTDIGEST” which would appear to be some sort of internal form validation.

        Adam

    • #14039
      Bryan Waldrop
      Participant

      Is there another place to confirm frontend version? My hover over reveal a generic ‘License and version information’ message (image attached)

      There is no custom code providing the value.
      It is manually entered people picker

      'Response_x0020_Submitted_x0020_b' is undefined
      Attachments:
    • #14076
      Alexander Bautz
      Keymaster

      See attached image.

      Alexander

      • #14093
        Bryan Waldrop
        Participant

        My apologies and thank you for your patience:
        Version information
        DFFS frontend: 4.4.1
        DFFS frontend CSS: 4.19 / 4.19
        Autocomplete: 1.4.7
        Cascading dropdowns: 3.528
        jQuery: 1.7.2
        Lookup: 1.1.5
        Resource management: not loaded
        SPJS-Utility: 1.267
        vLookup: frontend v2.2.76

      • #14099
        Bryan Waldrop
        Participant

        Browser: IE 11
        Version 11.0.9600.18376
        Update Version: 11.0.33

    • #14106
      Alexander Bautz
      Keymaster

      Thanks for the version info. You have the latest version so this shouldn’t be a problem. Could you check to see if you have “compatibility mode” activated on one of the computers?

      You can also press F12 to bring up the developer tools and look at the “Emulation” tab to see what document mode and user agent string the browser are running.

      Let me know if you have more details on how I can recreate the issue.

      Best regards,
      Alexander

    • #14135
      AdamP
      Participant

      For me, both are running in compatibility view…
      …”/Lists/Challenges/NewForm.aspx?RootFolder= is running in Compatibility View because ‘Display intranet sites in Compatibility View’ is checked.” Document mode for both is 8 (default) “via X-UA-compatible meta tag” (it’s a SP2010 site), and user agent is “default” for the functional version, and “Internet Explorer 11 (Default) for the non functional one.

      I’m starting to think it’s related to the specific build of the laptop and IE version in use. Things seem to get worse with Developer Tools open – the “Add-on failed to run” pop up and lots of errors if I run network analysis – 500 on lists.asmx, and various 401’s, 404’s and 407’s, and important things like jquery “pending”.

    • #14165
      Alexander Bautz
      Keymaster

      It’s hard to tell what this could be. I don’t have the same version of IE to test with and unfortunately I don’t see what this issue could be caused by.

      I guess you don’t have the rights to turn off the compatibility mode for intranet sites?

      You can try opening the developer tools and select “emulation” to try forcing it into a more modern document mode to see if this makes any difference?

      To test the rich text field, try writing this in the developer tools console:

      spjs.utility.getFieldValue({"fin":"PUT_YOUR_FIELD_NAME_HERE"}).replace(/<[^>]*>|\s| |xA0;|\u200b/g,'');

      What does the output look like?

      To test the people picker field, try writing this in the developer tools console:

      spjs.utility.getFieldValue({"fin":"PUT_YOUR_FIELD_NAME_HERE","delimiter":",","key":"loginName"});

      What does the output look like?

      Alexander

    • #14169
      AdamP
      Participant

      Thanks Alexander

      Much weirdness going on here, but I think we’re making some progress.

      I do have access to change compatibility view settings, but others here won’t, and it looks like changes there don’t have much, if any, effect.

      I have had some success with playing tunes on the emulation tab though. While doing that I’ve realised that the Rich Text Editor control only seems to display correctly in the default modes (doc mode 8, user agent IE11) – and anything entered into the rich text editor just isn’t recognised at all. The result of

      spjs.utility.getFieldValue({"fin":"Consultee"}).replace(/<[^>]*>|\s| |xA0;|\u200b/g,'');

      is simply

      ""

      If I change the emulation mode to anything other than the default, the Rich Text Field is rendered as a simple text box (text within is then recognised and the form can be saved – everything normal, except for the fact that it’s not a rich text field anymore).
      See attached screenshots.

      I’ll try some more tests on the build that functions correctly tomorrow to compare with the tests above, but I’ve got a feeling that something just isn’t quite right with this laptop build, unless you can think of a reason that the content of the RTE control would be completely inaccessible?
      I did find these two posts by Marc Anderson
      http://sympmarc.com/2011/02/10/finding-the-contents-of-a-sharepoint-rich-text-column-with-jquery/
      http://sympmarc.com/2011/02/14/finding-the-contents-of-a-sharepoint-rich-text-column-with-jquery-and-changing-it/
      Using `$(“textarea[Title=’Who have you consulted prior to this challenge’]”).closest(“span”).find(“iframe[Title=’Rich Text Editor’]”).blur(function(){
      alert($(this).contents().find(“body”).html());
      });` I’m able to alert the html contained within the RTE field – see third screenshot

      That code is quite similar to getFieldValue_SPFieldNote_HTML in spjs-utility.

      
      
      	"getFieldValue_SPFieldNote_HTML":function(a){
      		var f = spjs.$(spjs.utility.data.fields[a.fin]), v = "";
      		if(browseris.ie5up && browseris.win32 && !IsAccessibilityFeatureEnabled()){
      			if(f.find("iframe[class^='ms-rtelong']").contents().find('body').html() !== ""){
      				v = f.find("iframe[class^='ms-rtelong']").contents().find('body').html();
      			}else{
      				v = f.find('textarea:first').val();
      			}
      		}else{
      			v = f.find('textarea:first').val();
      		}
      		return v;
      	},

      browseris.win32 caught my attention – Will getFieldValue fail to target the correct values if I’m running in 64bit IE11? browseris.win32 in the console returns “false”… browseris.win64bit = “true” !

      I’ll try to get into IE 32bit mode somehow and report back.

      Adam

    • #14194
      Alexander Bautz
      Keymaster

      Hi,
      Using the 64 bit browser might very well be the reason – I didn’t think of this scenario.

      You should have the 32 bit version of the browser on this laptop as well – does this one work?

      Alexander

    • #15391
      AdamP
      Participant

      Just following up on this after a long delay…I couldn’t get IE to run in 32 bit mode…

    • #15471
      Alexander Bautz
      Keymaster

      In a setup where you have a 64 bit IE version, you should find the 32 bit version as a separate “app” in your start menu.

      Alexander

    • #15481
      AdamP
      Participant

      If it’s there I’m afraid I can’t locate it. I’ve even tried running iexplore.exe direct from c:\program files (x86) too, but no success, it still runs as the 64 bit version. Definitely no 32 bit app. It’s a corporate build of Windows 10 Enterprise, so possible something has been changed or locked down.
      I’m not sure what else I can try.

    • #15508
      Alexander Bautz
      Keymaster

      Could you bring up the developer console (F12 > Console) and paste in this:

      SPClientPeoplePicker.SPClientPeoplePickerDict

      What is the output?

      Alexander

Viewing 17 reply threads
  • You must be logged in to reply to this topic.